OMGY AI Developer Documentation
Build fast, capable applications on the OMGY AI API. Streaming chat completions, custom system instructions, conversations that keep their context across requests, and reasoning depth you control per call.
Overview #
OMGY AI provides a standard, high-throughput REST API for streaming (SSE) and non-streaming chat completions. Integrate conversational capabilities, code assistance, and multi-step reasoning into your applications with ease.
All standard API requests are served over HTTPS via: https://api.omgy.ai/v1
Quickstart #
Send your first streaming chat completion in seconds using cURL, Python, or JavaScript:
curl -N -X POST "https://api.omgy.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "omgy-1-mini",
"messages": [
{
"role": "system",
"content": "You are a helpful and concise assistant."
},
{
"role": "user",
"content": "Hello! How can I integrate with the OMGY AI API?"
}
],
"effort_level": "low",
"temperature": 0.7,
"max_output": "auto",
"stream": true
}'
Authentication #
The OMGY AI API authenticates requests using your personal API token. Your full API token is a single string
that starts with ogpr- (for example:
ogpr-10101010101010101010101010101010-XXXXXXX).
You can authenticate using standard Bearer authorization, direct header passing, or inside the JSON request body:
Authorization: Bearer YOUR_API_TOKEN
Your YOUR_API_TOKEN includes the whole key string (e.g.
ogpr-10101010101010101010101010101010-XXXXXXX). Replace YOUR_API_TOKEN with your
entire token.
Never expose your API key in client-side code, public GitHub repositories, or browser environments. Store it securely in backend environment variables.
Available Models #
Identifiers, context limits, maximum output tokens, and pricing for every model currently served:
| Model Identifier | Context Length | Pricing | Status |
|---|---|---|---|
omgy-1-mini
Latest
High-speed conversational and general reasoning model. This alias always resolves to the newest release.
|
1,000,000 tokens (1M) |
$0.05 / 1M in
$0.20 / 1M out
$0.0125 / 1M cache
|
Latest |
omgy-1-mini-20260901
Snapshot
Pinned snapshot release for strict reproducibility. Preview build, frozen at this date.
|
1,000,000 tokens (1M) |
$0.05 / 1M in
$0.20 / 1M out
$0.0125 / 1M cache
|
Preview |
System Prompts #
Steer the personality, formatting, constraints, and instructions of the model by providing a message with
"role": "system" in the messages array:
{
"model": "omgy-1-mini",
"messages": [
{
"role": "system",
"content": "You are a specialized Python programming mentor. Always respond with concise code snippets and clear explanations."
},
{
"role": "user",
"content": "How do I reverse a list in Python?"
}
]
}
Reasoning Effort Levels #
Choose how much the model thinks before it answers, with the effort_level parameter
(reasoning_effort is accepted as an alias). Higher levels trade latency for depth.
"Ultra High", "ultra_high" and "ULTRA-HIGH" are the same level.
An unrecognised value falls back to "Low" rather than failing the request.
| Effort Level | Best for |
|---|---|
"no" |
Thinking off. The fastest replies, for direct questions and simple lookups. |
"Auto" |
The model decides for itself whether to think and how much, from what you ask: a greeting is answered at once, a hard problem gets worked through. |
"Low" |
Light reasoning for everyday conversation. This is the default. |
"Medium" |
Balanced depth for questions that need a little working out. |
"High" |
Step-by-step reasoning for technical and analytical work. |
"Ultra High" |
Deep analysis, weighing several approaches before answering. |
"Apex Extreme High" |
Extended chain-of-thought for involved logic and mathematics. |
"X-Apex Extended Extreme" |
The deepest setting. Slowest to answer, for work where precision matters more than speed. |
POST /v1/chat/completions #
Creates a streaming or non-streaming model completion for the given conversation messages.
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model |
string | Yes | ID of the model to use. Example: "omgy-1-mini" |
messages |
array | Yes | A list of messages comprising the conversation (up to model maximum input limit, e.g. 16,384 tokens). Each message has role
("system", "user", "assistant") and content. |
effort_level |
string | No | Reasoning effort: "no", "auto", "low", "medium", "high",
"ultra_high", "apex_extreme", "x_apex_extended_extreme"
(default: "low").
|
stream |
boolean | No | If set to true, tokens are streamed via Server-Sent Events (SSE). If
false, returns a complete JSON object. (default: true).
|
chat_id |
string | No | Continue an existing conversation instead of starting a new one. Pass the
chat_id you were given (e.g. "c8f1e29a-4b7d-41a3-9e5c-0123456789ab") and the
model keeps the earlier context, so you only send the new message. Chats are shared with the web
so a conversation started in the browser can be continued from the API. |
save_chat |
boolean | No | If set to true, creates a new session in your account and returns a
chat_id visible in the Web sidebar. (default: false / stateless).
|
temperature |
float | No | Sampling temperature between 0.0 and 2.0. Defaults to 0.6.
|
max_output |
integer | "auto" |
No | Maximum tokens to generate. "auto" uses the model's full output limit
(32,768 for omgy-1-mini). A larger number is not an error: it is lowered to the
model limit and a warning is returned. If omitted, the server default (512) applies.
max_tokens and max_completion_tokens are accepted as aliases, so OpenAI SDKs work
unchanged. |
min_output |
integer | "auto" |
No | Minimum tokens to generate before the model is allowed to finish. "auto" (default) uses
the model's own minimum, which is 0 for omgy-1-mini: the model stops whenever its
answer is complete. A value above max_output is
lowered to it, with a warning. |
max_input |
integer | "auto" |
No | Maximum tokens allowed in your message for this request. "auto" (default) is the model's
input limit (16,384). A larger number is lowered to the model limit, with a warning. A longer
message is rejected with input_limit_exceeded. |
min_input |
integer | "auto" |
No | Minimum tokens your message must contain. "auto" (default) uses the model's own minimum,
which is 0 for omgy-1-mini: any length is accepted. A shorter message is rejected with input_too_short. |
top_p |
float | No | Nucleus sampling threshold. Defaults to 0.9. |
api_token |
string | No | Alternative to the Authorization: Bearer YOUR_API_TOKEN header. |
Non-Streaming Example (stream: false)
curl -X POST "https://api.omgy.ai/v1/chat/completions" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "omgy-1-mini",
"messages": [
{ "role": "user", "content": "What is the speed of light?" }
],
"stream": false
}'
Response Schema (stream: false)
{
"id": "chatcmpl-a1b2c3d4e5f6g7h8",
"object": "chat.completion",
"created": 1740000000,
"model": "omgy-1-mini",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "The speed of light in vacuum is approximately 299,792,458 meters per second (about 300,000 km/s or 186,282 miles/s)."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 34,
"total_tokens": 46
}
}
finish_reason is "stop" when the model finished its answer and "length"
when max_output ended it early.
Warnings
When a token parameter is outside what the model supports, OMGY adjusts it instead of failing and tells you
what it changed. The same warnings appear in three places: the OMGY-Warning response header
(visible with curl -i), a warnings array in the JSON body (stream: false),
and a warnings array on the first SSE chunk (stream: true). A value that cannot be used
at all, such as "max_output": "lots" or a negative minimum, is rejected with
400 invalid_token_param.
{
"id": "chatcmpl-a1b2c3d4e5f6g7h8",
"object": "chat.completion",
"model": "omgy-1-mini",
"choices": [ ... ],
"usage": { ... },
"warnings": [
{
"code": "max_output_clamped",
"param": "max_output",
"message": "'max_output'=50,000 is above the maximum output of OMGY-1-Mini (32,768 tokens); using 32,768."
}
]
}
GET /v1/models #
Lists the currently available models and snapshots in standard OpenAI format.
curl -X GET "https://api.omgy.ai/v1/models" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Response Schema
{
"object": "list",
"data": [
{
"id": "omgy-1-mini",
"name": "OMGY-1-Mini",
"created": 1740000000,
"context_length": 1000000,
"max_input_tokens": 16384,
"max_output_tokens": 32768,
"owned_by": "omgy-ai",
"root": "omgy-1-mini",
"parent": null
}
]
}
GET / DELETE /v1/chats #
List your saved conversations, read back their message history, or delete one permanently.
1. List Saved Chats (GET /v1/chats)
curl -X GET "https://api.omgy.ai/v1/chats" \
-H "Authorization: Bearer YOUR_API_TOKEN"
2. Get Chat History (GET /v1/chats/{chat_id})
curl -X GET "https://api.omgy.ai/v1/chats/c8f1e29a-4b7d-41a3-9e5c-0123456789ab" \
-H "Authorization: Bearer YOUR_API_TOKEN"
3. Delete Chat (DELETE /v1/chats/{chat_id})
curl -X DELETE "https://api.omgy.ai/v1/chats/c8f1e29a-4b7d-41a3-9e5c-0123456789ab" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Errors & Limits #
OMGY AI uses standard HTTP status codes to indicate the success or failure of API requests.
| Status Code | Error Code | Description |
|---|---|---|
200 OK |
— | The request was successful and streaming tokens or completion returned. |
400 Bad Request |
context_length_exceeded |
Input prompt or messages exceed the model's maximum allowed input tokens (e.g., 16,384 tokens). |
401 Unauthorized |
invalid_api_key |
Invalid or missing API key. Verify that your Authorization: Bearer YOUR_API_TOKEN
header is correct. |
404 Not Found |
model_not_found |
The requested model identifier was not found or is currently unsupported. |
429 Too Many Requests |
rate_limit_exceeded |
Your plan's usage budget has been reached. Usage is metered in dollars at the model's API price over three rolling windows (3 hours, 7 days, 31 days); the error message names the window and when it starts to refill. |
503 Service Unavailable |
model_not_loaded |
The inference server is currently initializing or offline. |