Chat

Create a stateless chat completion

Generate a multilingual assistant response. Send the full conversation on every request. Optional application instructions must be sent from a trusted server.

POST
/api/v1/chat/completions

Authorization

Authorization
Required
Bearer <token>

In: header

Request Body

application/jsonRequired

instructionsInstructions

Optional application instructions set by the API customer. Send these only from a trusted server; never expose API keys in clients.

max_tokensMax Tokens

Default: 512Minimum: 1Maximum: 2048

messages
Required
Messages

curl -X POST "https://api.orbitalsai.com/api/v1/chat/completions" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "instructions": "string",
    "max_tokens": 512,
    "messages": [
      {
        "content": "string",
        "role": "user"
      }
    ]
  }'

Successful Response

{
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "string",
        "role": "assistant"
      }
    }
  ],
  "created": 0,
  "id": "string",
  "model": "Perigee-1-text",
  "object": "chat.completion",
  "usage": {
    "completion_tokens": 0,
    "cost": 0,
    "prompt_tokens": 0,
    "total_tokens": 0
  }
}

Guide

Chat guide