curl --request POST \
--url https://api.creatok.ai/v1/images/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"model": "gpt-image-2",
"input": {
"prompt": "A product photograph of a ceramic mug on a clean desk",
"resolution": "1K",
"quality": "low",
"aspectRatio": "1:1"
}
}
'{
"id": "<string>",
"object": "job",
"capability": "<string>",
"model": "<string>",
"status": "queued",
"input": {},
"output": {
"files": [
{
"type": "<string>",
"url": "<string>"
}
]
},
"cost": {
"amount_usd": "<string>",
"refunded_usd": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>"
},
"metadata": {},
"created_at": "<string>",
"completed_at": "<string>",
"expires_at": "<string>"
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Images
Create an image generation job
Submit an image generation request with a supported public model ID. The response is a Job. Upload reference images with POST /files when the selected model supports them. See the model guide for supported inputs, limits, and defaults, and the pricing page for current rates. The charge appears in the returned Job. Reuse the same Idempotency-Key and body to retrieve the original Job without another charge. Poll GET /jobs/ for the stored output.
POST
/
images
/
generation
curl --request POST \
--url https://api.creatok.ai/v1/images/generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"model": "gpt-image-2",
"input": {
"prompt": "A product photograph of a ceramic mug on a clean desk",
"resolution": "1K",
"quality": "low",
"aspectRatio": "1:1"
}
}
'{
"id": "<string>",
"object": "job",
"capability": "<string>",
"model": "<string>",
"status": "queued",
"input": {},
"output": {
"files": [
{
"type": "<string>",
"url": "<string>"
}
]
},
"cost": {
"amount_usd": "<string>",
"refunded_usd": "<string>"
},
"error": {
"code": "<string>",
"message": "<string>"
},
"metadata": {},
"created_at": "<string>",
"completed_at": "<string>",
"expires_at": "<string>"
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Authorizations
Body
application/json
Response
A Job resource.

