OpenAI Chat Completions

POST
/v1/router/openai/v1/chat/completions

Proxy to OpenAI-compatible chat completions endpoint. Supports streaming via SSE.

Authorization

AuthorizationBearer <token>

API key as Bearer token: Authorization: Bearer dp_sk_xxx

In: header

Header Parameters

x-session-id?string

Public session affinity key. Body session_id takes precedence.

Lengthlength <= 256

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/router/openai/v1/chat/completions" \  -H "Content-Type: application/json" \  -d '{    "model": "string",    "messages": [      {        "role": "system",        "content": "string"      }    ]  }'
{  "id": "string",  "object": "string",  "choices": [    {}  ]}