Xenodia Docs
API ReferenceGenerated Reference

Create image generation

Creates a sync or async image generation request. Xenodia currently returns URL-based image results only.

POST
/v1/images/generations

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.xenodia.xyz/v1/images/generations" \  -H "Content-Type: application/json" \  -d '{    "model": "gpt-image-2",    "prompt": "A clean product render of a translucent AI gateway cube on a white desk.",    "response_format": "url"  }'
{
  "created": 0,
  "data": [
    {
      "url": "http://example.com"
    }
  ]
}
{
  "task_id": "string",
  "object": "task",
  "model": "string",
  "type": "image",
  "state": "waiting",
  "created_at": 0,
  "poll_url": "string",
  "capability_slug": "string",
  "capability_version": "string",
  "recommended_poll_interval_ms": 0,
  "eta_hint_seconds": 0
}
{
  "error": "bad_request",
  "message": "string",
  "type": "string",
  "code": "string"
}
{
  "error": "bad_request",
  "message": "string",
  "type": "string",
  "code": "string"
}
{
  "error": "bad_request",
  "message": "string",
  "type": "string",
  "code": "string"
}
{
  "error": "bad_request",
  "message": "string",
  "type": "string",
  "code": "string"
}
{
  "error": "bad_request",
  "message": "string",
  "type": "string",
  "code": "string"
}