Sign in

Text to image

documented

Generate an image from a text prompt using the specified engine.

POST /v1/generation/{engine_id}/text-to-imageGenerationno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

npx -y keychains@latest curl "https://api.stability.ai/v1/generation/{{$engine_id}}/text-to-image" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {{STABILITY_API_KEY}}" \
  -H "Organization: {{STABILITY_ORGANIZATION}}" \
  -H "Stability-Client-ID: {{STABILITY_CLIENT_ID}}" \
  -H "Stability-Client-Version: {{STABILITY_CLIENT_VERSION}}" \
  -d '{"height": {{$height}}, "width": {{$width}}, "text_prompts": [{"text": "{{$prompt}}", "weight": {{$prompt_weight}}}], "cfg_scale": {{$cfg_scale}}, "clip_guidance_preset": "{{$clip_guidance_preset}}", "sampler": "{{$sampler}}", "seed": {{$seed}}}'