API reference

Chat

POSThttps://api.oneover.com/functions/v1/api-v1-chatScope: chat

Stateless chat completions across every text model. Streaming and non-streaming. Prompts are not retained after the response.

Request body

Parameters

NameTypeRequiredDescription
modelstringYesText model ID from your catalog (GET api-v1-models?type=text).
messagesarrayYesConversation turns: { role: "system"|"user"|"assistant", content: string }.
streambooleanNoIf true, returns Server-Sent Events instead of JSON.
max_tokensnumberNoOptional completion budget cap.

Examples

Request
curl -X POST "https://api.oneover.com/functions/v1/api-v1-chat" \
  -H "Authorization: Bearer oo_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.6-sol",
    "messages": [
      { "role": "user", "content": "Hello from OneOver" }
    ],
    "stream": false
  }'

Non-streaming response

200 OK
{
  "request_id": "uuid",
  "model": "gpt-5.6-sol",
  "message": { "role": "assistant", "content": "..." },
  "credits_charged": 4,
  "balance": { "subscription": 14996, "anytime": 5000 },
  "efficiency": {
    "original_message_count": 5,
    "compacted_message_count": 3,
    "original_estimated_tokens": 4200,
    "compacted_estimated_tokens": 2800,
    "tokens_saved": 1400,
    "actions": ["dropped_2_old_turns"]
  }
}

Streaming (SSE)

Content-Type: text/event-stream. Each line is data: {...}.

Event types

NameTypeRequiredDescription
connection_establishedeventNoHandshake with request_id.
contenteventNoToken chunk in content field.
doneeventNoFinal event with credits_charged, balance, efficiency.
erroreventNoFailure during stream.

Try it in the Playground.