Chat API

POST https://api.oneover.com/functions/v1/api-v1-chat

Scope: chat

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

Request body

FieldTypeRequiredDescription
modelstringyesText model ID from your catalog
messagesarrayyes{ role, content } turns
streambooleannoIf true, returns SSE instead of JSON
max_tokensnumbernoOptional completion budget cap

Response (non-streaming)

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

Streaming events

EventDescription
connection_establishedHandshake with request_id
contentToken chunk in content field
doneFinal event with credits_charged, balance, efficiency
errorFailure during stream

Markdown