Rynler API reference
The current text inference API uses an OpenAI-compatible chat completion request.
Base URL
https://api.rynler.com/v1Authentication
Include Authorization: Bearer RYNLER_API_KEY. The key needs inference scope. See authentication details.
List models
GET /v1/models returns the models currently available to your key. The public catalogue shows model details and prices. Both model endpoints expose context_length, max_output_tokens and supports_tools. Unknown numeric provider limits are null. Existing fields remain available.
Create a chat completion
POST /v1/chat/completions accepts a model ID and text messages with system, user, or assistant roles. Optional fields include temperature, max_tokens, and streaming. Supply a fresh Idempotency-Key header for each request.
import os
import uuid
from openai import OpenAI
client = OpenAI(
base_url="https://api.rynler.com/v1",
api_key=os.environ["RYNLER_API_KEY"]
)
response = client.chat.completions.create(
model="xiaomi/mimo-v2.6-flash",
messages=[{"role": "user", "content": "Hello, world."}],
max_tokens=1024,
extra_headers={"Idempotency-Key": str(uuid.uuid4())}
)
print(response.choices[0].message.content)Progressive streaming is available for models with a qualified streaming profile (on 2026-10-07: MiMo V2.6 Flash); other models deliver server-sent events after the full completion is validated. With progressive streaming, content and reasoning_content deltas are forwarded as they arrive, tool calls are delivered once fully assembled, and the final event carries finish_reason and usage before [DONE]. An error after the stream opens arrives as event: error with code UPSTREAM_UNCERTAIN and no [DONE]. Models with supports_tools: true accept function tools with tool_choice: "auto". Preserve assistant tool calls, matching tool results and historical reasoning_content when continuing a tool conversation. The Responses API is not supported.
Generate an image
POST /v1/images/generations accepts model: openai/gpt-image-2, a text prompt, and optional quality (low, medium, high). This release generates one 1024×1024 PNG with an opaque background and automatic moderation. Responses contain data[0].b64_json and verified token usage. Image editing and URL outputs are not supported.
A request reserves up to 65,536 output tokens plus the conservative prompt allowance, then charges actual verified usage. This reservation is a Rynler accounting limit, not a provider output-token guarantee. If usage cannot be verified or exceeds the reservation, it is held for review.
{
"model": "openai/gpt-image-2",
"prompt": "A red sailboat on a calm lake",
"quality": "medium"
}Structured decisions
POST /v1/decisions accepts model: typesafe/jev-1.13.0, state (text, object or array), and a non-empty questions map. Question types are noul (yes/no probability), choice (named criteria) and score (ordered criteria). Input tokens are billed at the standard rate; output tokens are recorded without charge.
{
"model": "typesafe/jev-1.13.0",
"state": "The customer needs help",
"questions": {
"support": {
"type": "noul",
"instructions": "Does this require support?"
}
}
}Both endpoints require an inference API key, prepaid credit and a fresh Idempotency-Key header. They do not stream. After UPSTREAM_UNCERTAIN, check the existing request rather than automatically retrying.
Image input availability
Image input requires a specifically enabled vision model and supported image parts in user messages. Check GET /v1/vision-capabilities before use. A model name alone does not establish that vision is available.
Errors
Application errors return an error object with a code, message, and request ID. A token limit error means the input or requested output is too large. A rate limit error means you should reduce concurrency. An unavailable model or service should be checked against service status. A gateway failure can return a non-JSON response; retain the request details and check its outcome before submitting new work.
Read the quickstart, request limits, and pricing before integrating.