OpenAI DALL-E 2 text-to-image (executor coded; not enabled on this account).
Authenticate with the X-API-Key request header.
List price. Volume / bulk customers get a discounted rate — contact us for account pricing.
| Name | Type | Required | Description | Default / options |
|---|---|---|---|---|
| prompt | string | required | Text prompt describing the desired output. | — |
| n | number | optional | Number of images (1-10). | default: 1 |
| size | string | optional | Output size. | default: 1024x1024256x256512x5121024x1024 |
Submitting a job returns 202 Accepted with a job id. Poll GET /v1/jobs/{id} until the job reaches a terminal state, or register a webhook to be notified.
{
"job_id": "job_dalle2_a1b2c3",
"status": "queued"
}{
"id": "job_dalle2_a1b2c3",
"model": "dall-e-2",
"status": "succeeded",
"output": {
"outputs": [
{
"url": "https://cdn.trinetra.ai/out/dall-e-2/a1b2c3.png",
"type": "image"
}
]
},
"credits_charged": 10
}Webhook: set a webhook_url on your API key to receive a POST with the terminal job document instead of polling.