OpenAI chat completions

​

OpenAI-compatible chat completion endpoint for multi-turn conversations, tool calling, and streaming responses.

Body·
required
application/json
  • messages
    Type: array object[] ·
    required
  • model
    Type: string
    required
  • stream
    Type: boolean
  • temperature
    Type: number Format: double
    min:  
    0
    max:  
    2

    Sampling temperature. Type: double. Valid range: 0-2.

Responses
  • application/json
  • application/json
Request Example for post/v1/chat/completions
curl https://api.apigo.ai/v1/chat/completions \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "model": "gpt-4o",
  "messages": [
    {
      "role": "system",
      "content": ""
    }
  ],
  "temperature": 0,
  "stream": true
}'
{
  "id": "string",
  "object": "chat.completion",
  "choices": [
    {
      "index": 1,
      "message": {
        "role": "system",
        "content": "string"
      },
      "finish_reason": "string"
    }
  ],
  "usage": {
    "prompt_tokens": 1,
    "completion_tokens": 1,
    "total_tokens": 1
  }
}