API reference
Chat
https://api.oneover.com/functions/v1/api-v1-chatScope: chatStateless chat completions across every text model. Streaming and non-streaming. Prompts are not retained after the response.
Request body
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Text model ID from your catalog (GET api-v1-models?type=text). |
messages | array | Yes | Conversation turns: { role: "system"|"user"|"assistant", content: string }. |
stream | boolean | No | If true, returns Server-Sent Events instead of JSON. |
max_tokens | number | No | Optional completion budget cap. |
Examples
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
{
"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
| Name | Type | Required | Description |
|---|---|---|---|
connection_established | event | No | Handshake with request_id. |
content | event | No | Token chunk in content field. |
done | event | No | Final event with credits_charged, balance, efficiency. |
error | event | No | Failure during stream. |
Try it in the Playground.