POST
/
api
/
gateway
/
v1
/
chat
/
completions
curl --request POST \
  --url http://localhost:3000/api/gateway/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "openai/gpt-4o-mini",
  "metadata": {
    "waystone": "{\n\t\t\t\t\t\t\"user\": {\n\t\t\t\t\t\t\t\"id\": \"user123\",\n\t\t\t\t\t\t\t\"metadata\": { \"email\": \"user@example.com\", \"name\": \"John Doe\" }\n\t\t\t\t\t\t}\n\t\t\t\t\t}"
  },
  "store": false,
  "stream": false,
  "user": "<string>",
  "temperature": 1,
  "frequency_penalty": 0,
  "max_completion_tokens": 123,
  "n": 1,
  "messages": [
    {
      "content": "<string>",
      "role": "developer",
      "name": "<string>"
    }
  ]
}'
{
  "choices": [
    {
      "finish_reason": "<string>",
      "index": 123,
      "logprobs": {},
      "message": {
        "contents": "<string>",
        "refusal": "<string>",
        "role": "<string>",
        "annotations": [
          {}
        ],
        "audio": {}
      },
      "created": 123
    }
  ],
  "id": "<string>",
  "object": "<string>",
  "model": "<string>",
  "usage": {
    "completion_tokens": 123,
    "prompt_tokens": 123,
    "total_tokens": 123,
    "completion_tokens_details": {},
    "prompt_tokens_details": {}
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Response

200 - application/json

Successful response

The response is of type object.