API Docs

$…·Recharge
·

API Docs

OpenAI-compatible. Set base_url to https://api.eastx.ai/v1 and your existing SDK code works.

curl https://api.eastx.ai/v1/chat/completions \
  -H "Authorization: Bearer $EASTX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello, EastX!"}
    ],
    "stream": false
  }'

Supported endpoints

POST/v1/chat/completionsChat completions (streaming + non-streaming)
GET/v1/modelsList all available models
POST/v1/embeddingsGenerate embeddings (model-dependent)

Common errors

401

Invalid API key

Check the Authorization header. Use 'Bearer sk-eastx-...' format.

402

Insufficient balance

Top up via Recharge page.

404

Model not found

Use a model code from /v1/models.

429

Rate limit exceeded

Per-key RPM limit hit.