5V5Veda GatewayOpenAI-compatible API relay

Developer docs

Connect to 5Veda Gateway

All customer requests use https://api.5veda.cn/v1, with Authorization: Bearer veda_live_....

New API channel configuration

FieldValue
Channel typeOpenAI Compatible
Base URLhttps://api.5veda.cn/v1
Keyveda_live_... or veda_test_...

Chat Completions

curl
curl https://api.5veda.cn/v1/chat/completions \
  -H "Authorization: Bearer veda_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_CHAT_MODEL","messages":[{"role":"user","content":"Introduce 5Veda Gateway in one sentence"}]}'

Streaming

curl
curl -N https://api.5veda.cn/v1/chat/completions \
  -H "Authorization: Bearer veda_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_CHAT_MODEL","stream":true,"messages":[{"role":"user","content":"stream a short answer"}]}'

Embeddings

curl
curl https://api.5veda.cn/v1/embeddings \
  -H "Authorization: Bearer veda_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_EMBEDDING_MODEL","input":"text to embed"}'

Images

curl
curl https://api.5veda.cn/v1/images/generations \
  -H "Authorization: Bearer veda_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_IMAGE_MODEL","prompt":"clean product render","size":"1024x1024"}'

Video Tasks

curl
curl https://api.5veda.cn/v1/contents/generations/tasks \
  -H "Authorization: Bearer veda_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model":"YOUR_VIDEO_MODEL","content":[{"type":"text","text":"short product demo video"}]}'

curl https://api.5veda.cn/v1/contents/generations/tasks/TASK_ID \
  -H "Authorization: Bearer veda_live_..."

Usage & Billing

curl
curl https://api.5veda.cn/v1/usage?limit=100 \
  -H "Authorization: Bearer veda_live_..."

curl https://api.5veda.cn/v1/billing?limit=100 \
  -H "Authorization: Bearer veda_live_..."

Usage and billing APIs only return data for the customer that owns the current API key. Plaintext keys are never returned.

Common error codes

HTTPcodeMeaning
401unauthorizedMissing or invalid Bearer key.
402insufficient_creditThe prepaid balance is insufficient.
403model_not_allowedThe model is not enabled for this customer.
501unsupported_endpointThis OpenAI endpoint is not implemented by the gateway yet.