Generate pictures, list the picture models, and read each provider's parameters and prices.
| Method | Path | Billed | Does |
|---|---|---|---|
POST | /v1/images | yes | generates pictures |
GET | /v1/images/models | free | lists the picture models on sale |
GET | /v1/images/models/{lab}/{model}/endpoints | free | the providers serving one picture model, their parameters and prices |
Every route takes an API key: Authorization: Bearer $OPENDUNES_API_KEY. The full guide, with editing from a start picture and streaming, is Image Generation. POST /v1/images/generations is kept as an older address for the same route.
curl https://opendunes.com/v1/images \
-H "Authorization: Bearer $OPENDUNES_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "recraft/recraft-v4.1-flash",
"prompt": "A clay tajine on a blue zellige table, morning light",
"aspect_ratio": "4:3",
"n": 1
}'| Field | Description |
|---|---|
model · prompt | Required |
n | How many pictures, 1 to 10. A provider may return fewer; you pay for the pictures returned |
aspect_ratio · resolution · size | The shape and size; each provider takes its own subset — see its endpoints |
quality · background · output_format · output_compression | Rendering choices, where the provider has them |
input_references | Start pictures, as data URLs or public HTTPS links |
seed | Repeatable sampling, where the provider has it |
stream | Partial pictures as server-sent events, where the provider supports it |
provider | Routing; provider.max_price is in DA |
Every field travels to the model as you sent it; nothing is added. The answer is the model's, with each picture's file_id in Files and the cost in DA:
{
"created": 1758700000,
"data": [
{
"b64_json": "iVBORw0KGgoAAAANSUhEUgAA…",
"media_type": "image/png",
"file_id": "a2d16fe6-c19c-4f85-8759-937da517410d"
}
],
"usage": {
"cost": 2.184
}
}The answer carries X-Generation-Id, and X-Provider-Name — the lab that served it — when known. A model that is not a picture model is a 404.
curl https://opendunes.com/v1/images/models \
-H "Authorization: Bearer $OPENDUNES_API_KEY"Answers { "data": [ … ] } with the model object.
curl https://opendunes.com/v1/images/models/recraft/recraft-v4.1-flash/endpoints \
-H "Authorization: Bearer $OPENDUNES_API_KEY"{
"data": {
"id": "recraft/recraft-v4.1-flash",
"endpoints": [
{
"provider_name": "Recraft",
"provider_slug": "recraft",
"provider_tag": "recraft",
"supported_parameters": {
"aspect_ratio": { "type": "enum", "values": ["1:1", "4:3", "3:4", "16:9", "9:16", "auto"] },
"n": { "type": "range", "min": 1, "max": 6 }
},
"allowed_passthrough_parameters": ["controls"],
"supports_streaming": false,
"pricing": [
{ "billable": "output_image", "unit": "image", "cost": "2.184" }
]
}
]
}
}pricing[].cost is in DA per unit.