5V5Veda GatewayOpenAI-compatible API relay

Developer docs

接入 5Veda Gateway

所有客户请求统一使用 https://api.5veda.cn/v1,通过 Authorization: Bearer veda_live_... 鉴权。

New API 渠道配置

字段填写值
Channel typeOpenAI Compatible
Base URLhttps://api.5veda.cn/v1
Keyveda_live_...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":"请用一句话介绍 5Veda Gateway"}]}'

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":"需要向量化的文本"}'

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","prompt":"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_..."

用量和账单接口只返回当前 API key 所属客户的数据,不返回明文 key。

常见错误码

HTTPcode含义
401unauthorized缺少或错误的 Bearer key。
402insufficient_credit预付余额不足。
403model_not_allowed模型未对该客户授权。
501unsupported_endpoint当前网关暂未实现该 OpenAI 端点。