The task API

Every generation in ZekronAI — image, video, audio or tool — uses the same asynchronous task lifecycle. Learn it once and you can call any model.

One endpoint, every model

You create a task by POSTing to /v1/tasks with a model and an input object. The fields inside input depend on what each model supports — every model page documents its own parameters.

bash
curl -X POST https://api.zekron.tech/api/v1/task \
  -H "Authorization: Bearer zk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zekron-video-fast",
    "input": {
      "prompt": "drone shot over a coastline at sunrise",
      "duration": 5
    },
    "webhook_url": "https://your-app.com/zekron/webhook"
  }'

Task lifecycle

  • queued — the task is accepted and waiting for capacity.
  • processing — generation is underway.
  • succeeded — output is ready in the output object.
  • failed — generation could not be completed; see the error field. Failed tasks are not charged.
  • canceled — the task was canceled before completion.

Retrieving a task

bash
curl https://api.zekron.tech/api/v1/task/zk_task_8f3a2b1c9d \
  -H "Authorization: Bearer zk_live_xxx"

The task object

json
{
  "id": "zk_task_8f3a2b1c9d",
  "model": "zekron-video-fast",
  "status": "succeeded",
  "input": { "prompt": "drone shot over a coastline at sunrise", "duration": 5 },
  "output": { "video": "https://cdn.zekron.tech/out/8f3a2b1c9d.mp4" },
  "cost_usd": 0.20,
  "created_at": "2026-06-10T12:00:00Z",
  "completed_at": "2026-06-10T12:00:42Z"
}

Listing tasks

Page through your recent tasks, optionally filtering by status or model.

bash
curl "https://api.zekron.tech/api/v1/task?status=succeeded&limit=20" \
  -H "Authorization: Bearer zk_live_xxx"