Create Image
Generates an image from a text prompt using the specified model.
POST https://api.runcrate.ai/v1/images/generations
Request Body
| Parameter | Type | Required | Description |
|---|
model | string | Yes | The image generation model to use (e.g., black-forest-labs/FLUX.1-schnell). |
prompt | string | Yes | A text description of the image to generate. |
aspect_ratio | string | No | Aspect ratio of the output image (e.g., 1:1, 16:9, 9:16). |
num_inference_steps | integer | No | Number of denoising steps. More steps generally produce higher quality but take longer. |
guidance | number | No | Guidance scale — higher values produce images more closely aligned to the prompt. |
seed | integer | No | Random seed for reproducible generation. |
negative_prompt | string | No | Text 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
}
]
}
| Field | Type | Description |
|---|
data | array | Array of generated image objects. |
data[].url | string | URL of the generated image. Available for a limited time. |
data[].b64_json | string | null | Base64-encoded image data, if requested. |