Endpoint
Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | yes | — | Image model name (e.g. black-forest-labs-flux-2-klein-4b, flux-2-dev) |
prompt | string | yes | — | Text description of the image to generate. |
response_format | string | no | "url" | "url" returns a hosted URL. "b64_json" returns base64-encoded image bytes inline. |
target_namespace | string | no | current user | Namespace to save results and bill to. Can be an organization name. |
image_size | string or object | no | — | Size preset (e.g. square_hd, portrait_4_3) or {"width": 1024, "height": 1024}. |
num_inference_steps | integer | no | — | Number of denoising steps. |
seed | integer | no | — | Reproducibility seed. |
GET /api/evaluations/models/:id) to see the json_request_schema for model-specific parameters.
Examples
Basic generation
Response (response_format: "url")
Response (response_format: "b64_json")
Errors
| Condition | Error |
|---|---|
| No prompt | "Prompt cannot be empty" |
| Model not found | "Model not found: <name>" |