Docs

Running a model

Stability AIText to image

Stability AI Stable Diffusion XL v1.0 VAE Fix

Native 1024px SDXL generation with a corrected VAE for more reliable text-to-image and image-to-image workflows

POSTauray-serverless/civitai/101055-128078
openapi.jsonllms.txt

One of Auray's catalogue models: the same key, the same credits, the same job lifecycle as every other address.

Its request shape is published below. Whether it runs right now is GET /v1/catalogue's word, with no key needed: its addresses say connected for an address that runs, and a submit to any other is refused before anything is charged — described answers 501 model_not_connected, paused 503 model_disabled.

Category text-to-image · Scope image:write (or external:write on an older key) · Price Credits per megapixel (counted as width*height*steps+ultralytics.steps@40): 0.0893. From 1.2141 to 15.7287 megapixels a request. Quoted when you submit, at the most the request can cost; the charge settles to what the job cost and never above the quote. The submit's answer carries the quote as credits_quoted, and credits_charged says what has been taken.

#Input

FieldTypeRequiredDefaultDescription
widthintegeryes1024Width of the generated media in pixels. Documented range: 128 to 2,048.
heightintegeryes1024Height of the generated media in pixels. Documented range: 128 to 2,048.
stepsintegerno20Total number of denoising steps. Higher values generally produce more detailed results but take longer. Documented range: 1 to 50.
inputsobjectno—
inputs.seedImagestringno—Image used as a starting point for the generation (an http(s) URL; upload a local file first and send its read URL). A URL.
inputs.maskImagestringno—Image used to specify which areas of the input image should be edited (an http(s) URL; upload a local file first and send its read URL). White marks the area to edit, black is preserved. A URL.
positivePromptstringyes—Text prompt describing elements to include in the generated output. Documented range: 2 to 3,000 characters.
negativePromptstringno—Prompt to guide what to exclude from generation. Ignored when guidance is disabled (CFGScale ≤ 1). Documented range: 2 to 3,000 characters.
seedintegerno—Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range. Documented range: 0 to 9,223,372,036,854,776,000.
schedulerstringno—Scheduler to use for the diffusion process. One of "DDIM", "DDIMScheduler", "DDPMScheduler", "DEISMultistepScheduler", "Default", "DPM++", "DPM++ 2M", "DPM++ 2M Beta", "DPM++ 2M Exponential", "DPM++ 2M Karras", "DPM++ 2M SDE", "DPM++ 2M SDE Beta", "DPM++ 2M SDE Exponential", "DPM++ 2M SDE Karras", "DPM++ 2M SDE Uniform", "DPM++ 2M Uniform", "DPM++ 3M", "DPM++ 3M Beta", "DPM++ 3M Exponential", "DPM++ 3M Karras", "DPM++ 3M SDE Uniform", "DPM++ 3M Uniform", "DPM++ Beta", "DPM++ Exponential", "DPM++ Karras", "DPM++ SDE", "DPM++ SDE Beta", "DPM++ SDE Exponential", "DPM++ SDE Karras", "DPM++ Uniform", "DPM++ Uniform Beta", "DPM++ Uniform Exponential", "DPM++ Uniform Karras", "DPMSolverMultistepInverse", "DPMSolverMultistepScheduler", "DPMSolverSinglestepScheduler", "EDMDPMSolverMultistepScheduler", "EDMEulerScheduler", "Euler", "Euler a", "Euler Beta", "Euler Exponential", "Euler Karras", "EulerAncestralDiscreteScheduler", "EulerDiscreteScheduler", "FlowMatchEulerDiscreteScheduler", "Heun", "HeunDiscreteScheduler", "Heun Karras", "IPNDMScheduler", "IPNDM Uniform", "IPNDM Uniform Beta", "IPNDM Uniform Exponential", "IPNDM Uniform Karras", "KDPM2AncestralDiscreteScheduler", "KDPM2DiscreteScheduler", "LCM", "LCMScheduler", "LMS", "LMSDiscreteScheduler", "LMS Karras", "PNDMScheduler", "TCDScheduler", "UniPC", "UniPC 2M", "UniPC 2M Karras", "UniPC 2M Uniform", "UniPC 3M", "UniPC 3M Karras", "UniPC 3M Uniform", "UniPC Karras", "UniPC Uniform", "UniPC Uniform Beta", "UniPC Uniform Exponential", "UniPC Uniform Karras".
CFGScalenumberno—Guidance scale representing how closely the output will resemble the prompt. Higher values produce results more aligned with the prompt. Documented range: 0 to 30.
strengthnumberno0.8Strength of the transformation. Lower values result in more influence from the original input. Documented range: 0 to 1.
maskMarginintegerno—Extra context pixels around the masked region during inpainting. The model zooms into the masked area with these additional pixels for better integration. Documented range: 32 to 128.
clipSkipintegerno—Number of layers to skip in the CLIP model. Documented range: 0 to 4.
vaestringno—VAE model identifier. Overrides the default VAE included with the base model.
promptWeightingstringno—Defines the syntax to be used for prompt weighting. Prompt weighting allows you to adjust how strongly different parts of your prompt influence the generated image. Choose between compel notation with advanced weighting operations or sdEmbeds for simple emphasis adjustments. Compel syntax: Adds 0.2 seconds to image inference time. When compel syntax is selected, you can use the following notation in prompts: Weighting Syntax: + - (word)0.9 Increase or decrease the attention given to specific words or phrases. Examples: - Single words: small+ dog, pixar style - Multiple words: small dog, (pixar style)- - Multiple symbols for more effect: small+++ dog, pixar style - Nested weighting: (small+ dog)++, pixar style - Explicit weight percentage: small dog, (pixar)1.2 style Blend Syntax: .blend() Merge multiple conditioning prompts. Example: ("small dog", "robot").blend(1, 0.8) Conjunction Syntax: .and() Break a prompt into multiple clauses and pass them separately. Example: ("small dog", "pixar style").and() SdEmbeds syntax: When sdEmbeds syntax is selected, you can use the following notation in prompts: Weighting Syntax: (text) (text:number) [text] Use parentheses () to increase attention, square brackets [] to decrease it. Add a number after the text to specify a custom multiplier. Examples: - Single words: (small) dog, pixar style - Multiple words: small dog, [pixar style] - Higher emphasis: (small:2.5) dog, pixar style - Combined emphasis: (small dog:1.5), pixar style One of "compel", "sdEmbeds".
acceleratorOptionsobjectno—
acceleratorOptions.cacheEndStepintegerno—Absolute step number to end caching. Must be greater than cacheStartStep and less than or equal to steps. Documented range: 1 or more.
acceleratorOptions.cacheEndStepPercentageintegerno—Percentage of steps to end caching. Alternative to cacheEndStep. Must be greater than cacheStartStepPercentage. Documented range: 1 to 100.
acceleratorOptions.cacheMaxConsecutiveStepsintegerno3Limits the maximum number of consecutive steps that can use cached computations before forcing a fresh computation. Documented range: 1 to 5.
acceleratorOptions.cacheStartStepintegerno—Absolute step number to start caching. Must be less than cacheEndStep. Documented range: 0 or more.
acceleratorOptions.cacheStartStepPercentageintegerno—Percentage of steps to start caching. Alternative to cacheStartStep. Must be less than cacheEndStepPercentage. Documented range: 0 to 99.
acceleratorOptions.teaCachebooleanno—TeaCache acceleration for transformer-based models. Estimates step differences to skip redundant computations.
acceleratorOptions.teaCacheDistancenumberno0.5Controls the aggressiveness of the TeaCache feature. Lower values prioritize quality, higher values prioritize speed. Documented range: 0 to 1.
acceleratorOptions.deepCachebooleanno—DeepCache acceleration. Skips transformer computations in certain steps to speed up generation.
acceleratorOptions.deepCacheIntervalintegerno—Interval for DeepCache acceleration. A value of 2 skips every other step, 3 skips two out of three, etc. Documented range: 1 or more.
acceleratorOptions.deepCacheBranchIdintegerno—Branch ID for DeepCache acceleration. Determines which U-Net layers are skipped. Documented range: 0 or more.
outpaintobjectno—
outpaint.topintegerno—Number of pixels to extend to the top. Documented range: 0 or more.
outpaint.bottomintegerno—Number of pixels to extend to the bottom. Documented range: 0 or more.
outpaint.leftintegerno—Number of pixels to extend to the left. Documented range: 0 or more.
outpaint.rightintegerno—Number of pixels to extend to the right. Documented range: 0 or more.
outpaint.blurintegerno—Amount of blur to apply to the mask edge. Documented range: 0 to 32.
loraobject[]no—
lora[].modelstringno—LoRA model identifier.
lora[].weightnumberno1Strength of the LoRA influence. A value of 0 means no influence. Higher values increase the influence, and negative values can be used to steer away from the LoRA's style. Documented range: -4 to 4.
controlNetobject[]no—
controlNet[].modelstringno—ControlNet model identifier. One of "auray-serverless:20@1", "auray-serverless:3@1".
controlNet[].weightnumberno1Strength of the ControlNet influence. A value of 0 means no influence. Higher values increase the influence, and negative values can be used to steer away from the guide image. Documented range: -4 to 4.
controlNet[].guideImagestringno—Reference image for ControlNet guidance (an http(s) URL; upload a local file first and send its read URL). A URL.
controlNet[].controlModestringno"balanced"ControlNet guidance mode. One of "balanced", "controlnet", "prompt".
controlNet[].endStepintegerno—Absolute step number to end ControlNet influence. Must be greater than startStep and less than or equal to steps. Documented range: 1 or more.
controlNet[].endStepPercentageintegerno—Percentage of steps to end ControlNet influence. Must be greater than startStepPercentage. Documented range: 1 to 100.
controlNet[].startStepintegerno—Absolute step number to start ControlNet influence. Must be less than endStep. Documented range: 0 or more.
controlNet[].startStepPercentageintegerno—Percentage of steps to start ControlNet influence. Must be less than endStepPercentage. Documented range: 0 to 99.
ipAdaptersobject[]no—
ipAdapters[].modelstringno—Identifies IP-Adapter models. This identifier is a unique string that represents a specific model. One of "auray-serverless:55@1", "auray-serverless:55@2", "auray-serverless:55@3", "auray-serverless:55@4".
ipAdapters[].weightnumberno1Strength of the IP-Adapter influence. A value of 0 means no influence. Higher values increase the influence, and negative values can be used to steer away from the reference. Documented range: -4 to 4.
ipAdapters[].guideImagesstring[]no—Images to guide the IP-Adapter (an http(s) URL; upload a local file first and send its read URL). Documented range: 1 or more.
ipAdapters[].weightTypestringno"normal"Shapes how influence evolves during generation. One of "normal", "ease_in", "ease_out", "ease_in_out", "weak_input", "weak_output", "weak_middle", "strong_middle", "style_transfer", "composition", "strong_style_transfer", "style_and_composition", "strong_style_and_composition".
ipAdapters[].weightCompositionnumberno—Controls composition/layout influence specifically. Documented range: 0 to 1.
ipAdapters[].embedScalingstringno"kv"Determines which embedding components are used and their strength. One of "only_v", "kv", "kv_penalty_c", "k_mean_v_penalty_c".
ipAdapters[].combineMethodstringno"concat"Controls how multiple reference images are combined. One of "concat", "add", "subtract", "average", "norm_average".
refinerobjectno—
refiner.modelstringno—Refiner model identifier. One of "auray-serverless:101055@128080".
refiner.startStepintegerno—Absolute step number to switch from the base model to the refiner. Documented range: 1 or more.
refiner.startStepPercentageintegerno—Percentage of total steps at which to switch from the base model to the refiner. Documented range: 1 to 99.
embeddingsobject[]no—
embeddings[].modelstringno—Textual Inversion (Embedding) model identifier.
embeddings[].weightnumberno1Strength of the embedding influence. Documented range: -4 to 4.
hiresFixstringno—Two-stage generation for improved resolution and detail. The model generates at a lower resolution first, then upscales and refines the result in a second pass. Can be enabled with true for default settings, or configured as an object for fine-grained control over the upscaling model, steps, and strength. When using the object form, the model parameter is required. Available upscaling models: | Model | Name | Upscale Factor | | --- | --- | --- | | serverless:504@1 | RealESRGAN_x4plus | 4x | | serverless:realesrgan@anime-6b | RealESRGAN_x4plus_anime_6B | 4x | | serverless:esrgan@animesharp | 4x-AnimeSharp | 4x | | serverless:esrgan@ultrasharp | 4x-UltraSharp | 4x | Simple (boolean): json "hiresFix": true Configured (object): json "hiresFix": { "model": "serverless:esrgan@ultrasharp", "steps": 15, "strength": 0.6 }
photoMakerobjectno—
photoMaker.imagesstring[]no—Reference images for subject identity preservation. Each image must contain a single, clear face of the subject (an http(s) URL; upload a local file first and send its read URL). Documented range: 1 to 4.
photoMaker.strengthintegerno15Controls the balance between preserving the subject's original features and the creative transformation specified in the prompt. Lower values provide stronger subject fidelity, higher values allow more creative freedom. Documented range: 15 to 50.
photoMaker.stylestringno"No style"Artistic style applied to the generated images. One of "No style", "Cinematic", "Disney Character", "Digital Art", "Photographic", "Fantasy art", "Neonpunk", "Enhance", "Comic book", "Lowpoly", "Line art".
ultralyticsobjectno—
ultralytics.CFGScalenumberno8Face refinement guidance scale. Documented range: 0 to 50.
ultralytics.confidencenumberno0.9Confidence threshold for detection. Documented range: 0 to 1.
ultralytics.inpaintSizeintegerno1024Image size (in pixels) to use for each inpainting region. YOLO detects faces, crops the region, and scales it to this size before running diffusion. Set so most faces land in the 2–4× range of their original pixel size. Going beyond 8× may degrade identity resemblance. Documented range: 128 to 2,048.
ultralytics.maskBlurintegerno5Mask feathering amount. Higher values create softer transitions between the enhanced face region and surrounding areas. Documented range: 0 to 100.
ultralytics.maskPaddingintegerno5Padding around detected face in pixels. Expands the refinement area to include surrounding context like hair and neck. Documented range: 0 to 20.
ultralytics.negativePromptstringno—Negative prompt for detection.
ultralytics.positivePromptstringno—Positive prompt for detection.
ultralytics.stepsintegerno20Number of face refinement steps. Documented range: 1 to 100.
ultralytics.strengthnumberno0.3Refinement strength. Lower values preserve more of the original, higher values allow more aggressive reconstruction. Documented range: up to 1.
outputTypestringno"URL"Image output type. One of "URL".
outputFormatstringno"JPG"Specifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities. - `JPG`: Best for photorealistic images with smaller file sizes (no transparency). - `PNG`: Lossless compression, supports high quality and transparency (alpha channel). - `WEBP`: Modern format providing superior compression and transparency support. - `MP4`: Widely supported video container (H.264), recommended for general use. - `WEBM`: Optimized for web delivery. - `MOV`: QuickTime format, common in professional workflows (Apple ecosystem). - `GIF`: Animated image format (no audio), suitable for short loops or previews. - `MP3`: Compressed audio, smaller file size. - `WAV`: Uncompressed, high-quality audio. - `FLAC`: Lossless compression. - `OGG`: Open-source compressed audio format (Vorbis codec). - `SVG`: Scalable Vector Graphics. - `TIFF`: High-quality output supporting layers. - `GLB`: Binary glTF format for 3D models, including geometry, textures, and PBR materials. > [!NOTE] > **Transparency**: If you are using features like background removal or LayerDiffuse that require transparency, you must select a format that supports an alpha channel (e.g., `PNG`, `WEBP`, `TIFF`). `JPG` does not support transparency. One of "JPG", "PNG", "WEBP".
outputQualityintegerno95Compression quality of the output. Higher values preserve quality but increase file size. Documented range: 20 to 99.
safetyobjectno—
safety.checkContentbooleanno—Enable or disable content safety checking. Increases total generation time. Always on: a false is sent as true.
advancedFeaturesobjectno—
advancedFeatures.watermarkobjectno—
advancedFeatures.watermark.textstringno—Watermark text. Documented range: 2 to 32 characters.
advancedFeatures.watermark.imagestringno—Watermark image (an http(s) URL; upload a local file first and send its read URL). A URL.
advancedFeatures.watermark.displayPositionstringno—Watermark position. One of "top-left", "top-center", "top-right", "center-left", "center-center", "center-right", "bottom-left", "bottom-center", "bottom-right", "tiled".
advancedFeatures.watermark.opacitynumberno—Watermark opacity. Documented range: 0.1 to 1.
advancedFeatures.watermark.fontColorstringno—Text color in hex format.
advancedFeatures.watermark.bgColorstringno—Background color in hex format.
idempotency_keystringno—Your own name for this request. Send the same one twice and the second call is answered with the first request rather than charged again. Idempotency-Key: as a header is accepted as an alias — that is the spelling a retrying proxy replays, and the one to use when running a model on auray.run, where a request that outlives its connection is answered 504 and recovered by replay. Omit it and the platform mints one. 1 to 64 characters.

#Rules

Across fields, as the model's documentation states them. Each is judged before anything is charged — warned with a Deprecation header until enforcement starts — and listed as JSON Schema under x-auray-rules in the openapi.json.

  • Send height whenever width is sent. Send width whenever height is sent.
  • When strength is sent or inputs.maskImage is sent, inputs.seedImage is required.
  • Do not send acceleratorOptions.cacheStartStep and acceleratorOptions.cacheStartStepPercentage together. Do not send acceleratorOptions.cacheEndStep and acceleratorOptions.cacheEndStepPercentage together. Do not send a request where acceleratorOptions.teaCache is true and acceleratorOptions.deepCache is true.
  • When outpaint is sent: send at least one of outpaint.top, outpaint.bottom, outpaint.left or outpaint.right.
  • lora must hold at least 1 item. In every item of lora: lora[].model is required.
  • controlNet must hold at least 1 item. In every item of controlNet: controlNet[].model and controlNet[].guideImage are required. In every item of controlNet: do not send controlNet[].endStep and controlNet[].endStepPercentage together. In every item of controlNet: do not send controlNet[].startStep and controlNet[].startStepPercentage together.
  • ipAdapters must hold at least 1 item. In every item of ipAdapters: ipAdapters[].model and ipAdapters[].guideImages are required.
  • When refiner is sent: refiner.model is required. When refiner is sent: do not send refiner.startStep and refiner.startStepPercentage together.
  • embeddings must hold at least 1 item. In every item of embeddings: embeddings[].model is required.
  • When photoMaker is sent: photoMaker.images is required.
  • When advancedFeatures.watermark is sent: send exactly one of advancedFeatures.watermark.text or advancedFeatures.watermark.image.

#Example

curl -X POST https://queue.auray.run/auray-serverless/civitai/101055-128078 \
  -H "Authorization: Bearer $AURAY_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "width": 1024,
  "height": 1024,
  "positivePrompt": "a brass orrery on a walnut desk, morning light from a window to the left"
}'

The same body on https://auray.run runs synchronously and answers the result — unless it usually takes longer than a run may hold its connection, which is refused 400 model_not_synchronous before anything is charged. Options — ?webhook=, ?wait=, priority and timeout headers — are on Submit a request.

#Machine contracts

  • openapi.json — this page as an OpenAPI 3.1 document, public.
  • llms.txt — the same, written for an agent.

Start typing to search every page of the documentation.

Up arrow Down arrow to moveEnter to openEscape to close