POST /v1/chat/completions

Punt final de finalització de xat compatible amb OpenAI.

POST /v1/chat/completions

Utilitzeu la interfície compatible amb OpenAI amb els SDK OpenAI i clients compatibles.

Autenticació

Authorization: Bearer mg_live_...\ncontent-type: application/json

Sol·licitud

curl https://api.model-gate.com/v1/chat/completions \
  -H "Authorization: Bearer mg_live_..." \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-opus-4.8",
    "messages": [{"role": "user", "content": "Hello"}],
    "stream": false
  }'

Transmissió en directe

Set "stream": true per rebre esdeveniments enviats pel servidor en format compatible amb OpenAI.