Model capabilities
Generate text
Use the Responses API for new text integrations or Chat Completions when an existing OpenAI-compatible client already expects messages and choices. Both interfaces use the same Byta chat runtime, billing, reasoning controls, and streaming transport.
OpenAI client compatibleTry in chat
Choose a model
Use the authenticated GET /v1/models catalog as the source of truth. Newly advertised chat models work here automatically when their configured upstream speaks the Responses protocol.
Catalog-driven routing
Model IDs, context limits, output limits, reasoning choices, and prices can change independently of this page. Read them from
GET /v1/models before presenting a model picker or validating a request.Context and output limits
The context window includes system instructions, conversation history, tool context, and reserved output space.
Inspect
maxInputTokens, maxOutputTokens, andsafetyMarginTokens on each catalog entry.Create a response
Send text as a string or a role-based input array. The response includes standard output items and token usage.
POST
/v1/responsesJSON · optional SSE stream
Responses API
from openai import OpenAI
client = OpenAI(
api_key="YOUR_BYTA_API_KEY",
base_url="https://api.byta-ai.com/v1",
)
response = client.responses.create(
model="Byta-1.5",
instructions="You are a concise product strategist.",
input="Write a one-sentence positioning statement for a private AI workspace.",
)
print(response.output_text)Compact a conversation
Shrink a long Responses conversation into a canonical input item that can be passed verbatim to the next response request.
POST
/v1/responses/compactJSON response
cURL · compaction
curl https://api.byta-ai.com/v1/responses/compact \
-H "Authorization: Bearer $BYTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"Byta-1.5","input":[{"role":"user","content":"Compact this conversation."}]}'Preserve the returned state
Send the returned
output array unchanged as input to the nextPOST /v1/responses call. Byta does not parse or rewrite encrypted reasoning and compaction state.Core parameters
modelrequiredstringAn active chat model returned by GET /v1/models.
inputrequiredstring | arrayPlain text, role-based messages, or Responses protocol items such as function_call_output.
instructionsoptionalstringHigh-level system or developer instructions.
max_output_tokensoptionalintegerPositive upper bound for generated output tokens.
reasoning.effortoptionalstringA /v1/models catalog value or model-specific alias from the table below.
toolsoptionalarrayResponses tools supported by the selected model, including function tools and web search.
streamoptionalbooleanReturn typed server-sent events as output is generated.
Reasoning labels and API aliases
The Chat UI shows friendly labels. API clients can send the corresponding catalog value returned by GET /v1/models or one of its case-insensitive aliases. The exact aliases are model-specific and shown below.
| Endpoint | Request field | Example |
|---|---|---|
POST /v1/responses | reasoning.effort | "reasoning": {"effort": "balanced"} |
POST /v1/chat/completions | reasoning_effort | "reasoning_effort": "pro" |
When reasoning is omitted
An API request that omits reasoning sends no explicit effort, so the selected model's upstream default applies. Use a value advertised in that model's
reasoningEfforts array when behavior must be explicit.Analyze images
All advertised Byta chat models accept image input through the Responses API. Images stay typed as vision parts and their upstream vision tokens are included in input usage and billing.
Python · image input
from openai import OpenAI
client = OpenAI(
api_key="YOUR_BYTA_API_KEY",
base_url="https://api.byta-ai.com/v1",
)
response = client.responses.create(
model="Byta-1.5-pro",
input=[{
"role": "user",
"content": [
{"type": "input_text", "text": "Describe this image."},
{
"type": "input_image",
"image_url": "https://example.com/photo.jpg",
"detail": "high",
},
],
}],
)
print(response.output_text)
print(response.usage.input_tokens)| Limit | Value |
|---|---|
| Endpoint | POST /v1/responses |
| Formats | JPEG and PNG |
| Images | Up to 20 per request |
| Size | 20 MiB per image and 20 MiB total inline image bytes |
| Detail | auto, low, or high |
| Billing | Upstream-reported vision tokens are included in input_tokens |
Use the final usage
Final billing uses the selected upstream's returned
input_tokens, including image tokens. If upstream usage is unavailable, Byta falls back to the GPT 32px-patch estimate. Base64 transport bytes are never counted as text tokens.Web search
Add the web_search tool when the answer needs current public information. Function and agent tools use the same Responses endpoint and are forwarded without flattening their protocol items.
cURL · web search
curl https://api.byta-ai.com/v1/responses \
-H "Authorization: Bearer $BYTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Byta-1.5-pro",
"input": "Summarize the latest public information about this topic.",
"tools": [{"type": "web_search"}]
}'Billing
Search context can increase metered input usage. Inspect the final response usage rather than estimating cost from the visible prompt alone.
Developer instructions
Byta's configured developer prompt is applied by default. Your own Responses instructions are retained after it, including when using agent tools.
Stream text
Set stream to true for incremental output. Stop reading after response.completed, or close the connection to cancel the active upstream request.
Python · streaming
from openai import OpenAI
client = OpenAI(
api_key="YOUR_BYTA_API_KEY",
base_url="https://api.byta-ai.com/v1",
)
with client.responses.stream(
model="Byta-1.5-pro",
input="Explain why idempotency matters in an asynchronous API.",
) as stream:
for event in stream:
if event.type == "response.output_text.delta":
print(event.delta, end="", flush=True)Streaming events
Text arrives in
response.output_text.delta events. The terminalresponse.completed event includes final usage.Responses stream events
| Event | Meaning |
|---|---|
response.created | The response object was accepted. |
response.output_item.added | An assistant output item started. |
response.output_text.delta | Incremental text content. |
response.output_text.done | Text for the output item is complete. |
response.completed | Terminal response with final usage. |
response.failed | Terminal model or transport failure. |
Chat Completions
Use this text-only endpoint for clients built around messages, choices, and chat.completion response objects. Send image input through POST /v1/responses.
POST
/v1/chat/completionsJSON · optional SSE stream
cURL · Chat Completions
curl https://api.byta-ai.com/v1/chat/completions \
-H "Authorization: Bearer $BYTA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Byta-1.5",
"messages": [
{"role": "system", "content": "Answer with one short paragraph."},
{"role": "user", "content": "What makes a good API error message?"}
]
}'Errors
Errors use an OpenAI-style envelope with message, type, param, and code.
| Code | Meaning | What to do |
|---|---|---|
invalid_api_key | Bearer key is missing or invalid. | Create or rotate a user API key. |
model_not_found | The model is not public or enabled. | Use GET /v1/models and select an active text model. |
unsupported_content_type | A content part is not supported by the selected model. | Use a supported Responses item type. |
model_not_responses_capable | The catalog route is not backed by a Responses endpoint. | Choose another live model or ask the operator to correct its upstream route. |
unsupported_parameter | The request uses an unsupported option such as n != 1. | Adjust the named parameter. |
invalid_image | An image URL or inline payload is malformed. | Use a public HTTPS URL or a valid JPEG/PNG data URL. |
image_limit_exceeded | The request contains too many images. | Reduce the request to the advertised image limit. |
model_request_failed | The internal model request could not complete. | Retry with bounded exponential backoff. |