Documentation

Gateway

The gateway is OpenAI-compatible, workspace-scoped and metered to the credit balance.

Endpoints#

GET /v1/modelsList live models the key may call.
GET /v1/models/<id>One listing with pricing and context.
POST /v1/chat/completionsChat, tools and streaming.
POST /v1/embeddingsEmbeddings for retrieval listings.

Authentication#

curl https://api.example.com/v1/chat/completions \
  -H "Authorization: Bearer zp_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model":"zeph-nexus-4","messages":[{"role":"user","content":"Ship it"}]}'

Limits and metering#

  • Key scopes, allowed models, IP allowlists, rate limit and spend cap are enforced before upstream.
  • Workspace credit balance must be positive; the cost is deducted after a successful response.
  • One RequestLog, one daily UsageDaily update and one CreditTransaction per call.
  • Streaming is SSE and ends with data: [DONE].

Sandbox provider#

Seeded listings use the sandbox provider so the demo works offline. It is a real local adapter inside the routing path, labelled in responses. Configure a vendor endpoint in /org/models/<uuid>/edit/ to call a real upstream.

Webhooks#

Deliveries are HMAC-SHA256 signed with X-ZephAI-Signature. Register destinations per workspace; failed deliveries retain a record for retry.