Skip to main content

SDXL API usage

For general tips on SDXL training and inference, see SDXL training

Unlike SD15 checkpoint training, SDXL on Astria is trained as a LoRA+text-embedding. As such, inference is taking place a on a base line model such as SDXL 1.0 and prompt.text should specify the loaded lora such as <lora:123456:0.83> - will load lora with id=123456 and strength=0.83

See LoRA docs on lora syntax

With SDXL you cannot combine multiple LoRAs.

Use any SDXL model from the gallery to do inference.


If you are receiving 422 error model_type=pti is not supported. Use a checkpoint instead - Change the request URL to with 666678 as a hard-coded tune_id of SDXL 1.0 from the gallery. See explanation above.

POST /tunes/:id/prompts

# Note the hard-coded 666678 which is the tune_id of SDXL 1.0 from the gallery
curl -X POST -H "Authorization: Bearer $API_KEY" \
-F prompt[text]="<lora:tune_id:strength> a painting of ohwx man in the style of Van Gogh" \
-F prompt[negative_prompt]="old, blemish, wrin" \
-F prompt[super_resolution]=true \
-F prompt[face_correct]=true \
-F prompt[callback]=""