API-Key API Reference

One API for video, image, music and LLM models.

Use a single API key and credit wallet to call OpenAI-compatible chat and embeddings routes, create async media tasks, poll results and serve model capabilities to your own customers.

Authentication

Send a consumer API key with every request.

Authorization: Bearer YOUR_API_KEY
# or
x-api-key: YOUR_API_KEY

Core endpoints

GET

/v1/models

List public models, categories and metadata.

POST

/v1/chat/completions

OpenAI-compatible chat completion endpoint routed through gateway channels.

POST

/v1/embeddings

OpenAI-compatible embeddings endpoint.

POST

/v1/images/generations

Create image generation tasks from prompts and references.

POST

/v1/videos

Create text-to-video, image-to-video or video-to-video tasks.

POST

/v1/music/generations

Create music generation tasks.

GET

/v1/tasks/{task_id}

Poll image, video or music task status and output URLs.

Video task example

curl https://api-key.org/v1/videos \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2",
    "prompt": "A cinematic product launch video with smooth camera motion",
    "callback_url": "https://your-app.com/webhooks/api-key"
  }'

Task response

{
  "task_id": "task_abc123",
  "id": "task_abc123",
  "object": "gateway.video.task",
  "status": "pending"
}

Poll task status

curl https://api-key.org/v1/tasks/task_abc123 \
  -H "Authorization: Bearer $API_KEY"

Gateway behavior

CapabilityWhat API-Key provides
API keysConsumer keys with profile settings, model limits, IP allowlists and usage tracking.
Channel routingPublic models map to upstream channels with group, priority, weight and retry policy.
BillingCredits can be reserved before a task, settled after completion and refunded when provider tasks fail.
Media deliveryGenerated assets are returned as durable result links and tracked by task status.
Task APIsAsync media generation returns task_id and can be polled by consumers.

Error format

{
  "error": {
    "message": "Insufficient credits",
    "type": "gateway_error",
    "code": "insufficient_credits"
  }
}