Text

Chat

Send stateless multilingual chat requests to Perigee-1-text.

import os
import orbitalsai
 
client = orbitalsai.Client(api_key=os.environ["ORBITALSAI_API_KEY"])
 
response = client.chat(
    messages=[
        {"role": "user", "content": "Ina so in buɗe asusun kasuwanci."}
    ],
    instructions="Answer briefly as a banking support assistant.",
    max_tokens=200,
)
 
print(response.text)

Chat is stateless. Send the complete conversation with every request.

Message format

  • Messages use user and assistant roles.
  • The list must start and end with user.
  • Roles must alternate.
  • A request may contain up to 40 messages.
  • max_tokens accepts 1 through 2,048 and defaults to 512.
  • instructions are optional application-level context and should come from a trusted server.

REST request

curl -X POST "https://api.orbitalsai.com/api/v1/chat/completions" \
  -H "Authorization: Bearer $ORBITALSAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{"role":"user","content":"Sannu, yaya kake?"}],
    "max_tokens": 200
  }'

Response

The response contains id, model, choices, and usage. Read the assistant message from choices[0].message.content in REST or response.text in the Python SDK.

Chat streaming is not currently exposed by this endpoint. OrbitalsAI chat is a multilingual application API, not a general-purpose frontier model.

Next steps

On this page