Ariz. Rev. Stat. § 13-4512
C. A county board of supervisors that has designated a county restoration treatment program may enter into contracts with providers, including the Arizona state hospital, for inpatient, in-custody competency restoration treatment. A county competency restoration treatment program may do the following:
D. In determining the type and location of the treatment, the court shall select the least restrictive treatment alternative after considering the following:
F. A defendant shall pay the cost of inpatient, in-custody competency restoration treatment unless otherwise ordered by the court. If the court finds the defendant is unable to pay all or a portion of the costs of inpatient, in-custody treatment, the city, town or county shall pay the costs of inpatient, in-custody competency restoration treatment at the Arizona state hospital that are incurred until:
H. Payment for the cost of outpatient community treatment is the responsibility of the defendant unless:
I. A treatment order issued pursuant to this section is valid for one hundred eighty days or until one of the following occurs: