Skip to main content
POST
/
chat
/
completions
Create chat completion
curl --request POST \
  --url https://api.ai-stats.phaseo.app/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "messages": [
    {
      "role": "system",
      "content": "<string>",
      "name": "<string>",
      "tool_calls": [
        {
          "id": "<string>",
          "type": "function",
          "function": {
            "name": "<string>",
            "arguments": "<string>",
            "description": "<string>",
            "parameters": {}
          }
        }
      ],
      "tool_call_id": "<string>"
    }
  ],
  "system": "<string>",
  "reasoning": {
    "effort": "medium",
    "summary": "auto"
  },
  "frequency_penalty": 0,
  "logit_bias": {},
  "max_output_tokens": 2,
  "meta": false,
  "presence_penalty": 0,
  "seed": 0,
  "stream": false,
  "temperature": 1,
  "tools": [
    {
      "type": "function"
    }
  ],
  "max_tool_calls": 2,
  "parallel_tool_calls": true,
  "tool_choice": "<string>",
  "top_k": 2,
  "logprobs": false,
  "top_logprobs": 10,
  "top_p": 0.5,
  "response_format": "<string>",
  "usage": true,
  "user_id": "<string>",
  "service_tier": "standard"
}
'
{
  "id": "<string>",
  "object": "<string>",
  "created": 123,
  "model": "<string>",
  "choices": [
    {
      "index": 123,
      "message": {
        "role": "system",
        "content": "<string>",
        "name": "<string>",
        "tool_calls": [
          {
            "id": "<string>",
            "type": "function",
            "function": {
              "name": "<string>",
              "arguments": "<string>",
              "description": "<string>",
              "parameters": {}
            }
          }
        ],
        "tool_call_id": "<string>"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 123,
    "completion_tokens": 123,
    "total_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
model
string
required
messages
object[]
required
Minimum array length: 1
system
string
reasoning
object
frequency_penalty
number
Required range: -2 <= x <= 2
logit_bias
object
max_output_tokens
integer
Required range: x >= 1
meta
boolean
default:false
presence_penalty
number
Required range: -2 <= x <= 2
seed
integer
Required range: -9223372036854776000 <= x <= 9223372036854776000
stream
boolean
default:false
temperature
number
default:1
Required range: 0 <= x <= 2
tools
object[]
max_tool_calls
integer
Required range: x >= 1
parallel_tool_calls
boolean
default:true
tool_choice
top_k
integer
Required range: x >= 1
logprobs
boolean
default:false
top_logprobs
integer
Required range: 0 <= x <= 20
top_p
number
Required range: 0 <= x <= 1
response_format
usage
boolean
user_id
string
service_tier
enum<string>
default:standard
Available options:
flex,
standard,
priority

Response

200 - application/json

Chat completion response

id
string
object
string
created
integer
model
string
choices
object[]
usage
object