Skip to main content
ByteSpike treats every modality as a peer of text — same auth header, same wallet, same headers. The shape of the request is family-specific (images use /images/generations, video uses /tasks/submit, etc.) but the auth and billing surfaces are unified.

Family overview

FamilySync?Key endpoints
TextYes (with optional streaming)/v1/messages, /v1/chat/completions, /v1/responses, /v1beta/models/{model}:generateContent
Image (sync)Yes (≤30s)/v1/images/generations, /v1/images/edits
Image / Video (async)No, asyncPOST /v1/tasks/submit → poll /v1/tasks/query (or SSE /v1/tasks/stream/:id)
UtilityYes (free)/v1/models, /v1/usage, /v1/balance, /v1/tasks/{query,cancel}

Why async for video

Video generation typically takes 30–180 seconds of GPU time. Holding an HTTP connection that long is fragile (proxies time out, retries multiply cost). The async pattern is:
  1. POST /v1/tasks/submit → returns task_id + estimated_credits + estimated_seconds immediately
  2. Poll POST /v1/tasks/query with {"task_id": "..."} (free) on a cadence matched to the ETA, or stream GET /v1/tasks/stream/{task_id} over SSE for push delivery, or register a callback_url on submit and skip polling entirely
  3. When status == "completed", the output array carries the result URLs
Status transitions: pending → running → completed (happy path), pending → running → failed (unbilled), or pending|running → cancelled (manual cancel, billing depends on the model’s refund policy).

Mixing modalities in one app

Each API key is bound to one routing group on ByteSpike, which determines which models it can reach. For an app spanning multiple model families, create one key per group:
# Key bound to the Claude group — reaches Claude + (via translation) DeepSeek-Anthropic + cross-protocol Gemini-via-translated
curl https://llm.bytespike.ai/api/v1/keys -H "x-api-key: $ADMIN_KEY" -d '{
  "name": "vision-claude-prod",
  "group_id": 1
}'

# Key bound to the Gemini group — reaches Gemini native + image/video models in that group
curl https://llm.bytespike.ai/api/v1/keys -H "x-api-key: $ADMIN_KEY" -d '{
  "name": "vision-gemini-prod",
  "group_id": 3
}'
The list of available groups for your account is at GET /api/v1/groups/available or the Create key dialog in the console. To attribute spend per pipeline, hit GET /api/v1/usage filtered by api_key_id.