Skip to main content

Create Image

Generates an image from a text prompt using the specified model.
POST https://api.runcrate.ai/v1/images/generations

Request Body

ParameterTypeRequiredDescription
modelstringYesThe image generation model to use (e.g., black-forest-labs/FLUX.1-schnell).
promptstringYesA text description of the image to generate.
aspect_ratiostringNoAspect ratio of the output image (e.g., 1:1, 16:9, 9:16).
num_inference_stepsintegerNoNumber of denoising steps. More steps generally produce higher quality but take longer.
guidancenumberNoGuidance scale — higher values produce images more closely aligned to the prompt.
seedintegerNoRandom seed for reproducible generation.
negative_promptstringNoText describing what to exclude from the generated image.
Available parameters vary by model. Some models may not support all parameters listed above. Unsupported parameters are silently ignored.

Example Request

curl https://api.runcrate.ai/v1/images/generations \
  -H "Authorization: Bearer rc_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "black-forest-labs/FLUX.1-schnell",
    "prompt": "A futuristic cityscape at sunset, cyberpunk style",
    "aspect_ratio": "16:9",
    "num_inference_steps": 4
  }'

Response

{
  "data": [
    {
      "url": "https://assets.runcrate.ai/generations/img_abc123.png",
      "b64_json": null
    }
  ]
}
FieldTypeDescription
dataarrayArray of generated image objects.
data[].urlstringURL of the generated image. Available for a limited time.
data[].b64_jsonstring | nullBase64-encoded image data, if requested.