Kyboro API documentation
The Kyboro API is OpenAI-compatible: base URL https://kyboro.com/v1, standard chat completions, streaming, vision, and tool calling. If you already use an OpenAI SDK, you only change the base URL, the key, and the model name.
Don't have a key yet? Create an account or sign in, then mint a key in your API dashboard.
Quickstart
# pip install openai
from openai import OpenAI
client = OpenAI(
base_url="https://kyboro.com/v1",
api_key="sk-kyb-...",
)
resp = client.chat.completions.create(
model="kyboro-forge-1",
messages=[{"role": "user", "content": "Write a binary search in Rust"}],
)
print(resp.choices[0].message.content)Authentication
Every request needs your API key in the Authorization header. Keys start with sk-kyb- and are shown once at creation — store them in an environment variable or secrets manager, never in client-side code or a repository.
Authorization: Bearer sk-kyb-...Billing is prepaid: requests draw from your wallet at the per-token prices below. When the balance reaches zero, requests return 402 until you top up. You can create up to 10 keys, set per-key daily spend limits, and revoke a key instantly from the dashboard.
Chat completions
POST /v1/chat/completions — the only endpoint you need.
| Field | Type | Notes |
|---|---|---|
| model | string | One of the model ids below. Required. |
| messages | array | OpenAI chat format: system / user / assistant / tool. Required. |
| stream | boolean | Server-sent events when true. Default false. |
| max_tokens | integer | Output cap, 1–16000. Default 4096. |
| tools | array | OpenAI function-calling tool definitions. |
The response is a standard chat completion object with a usage block — prompt_tokens and completion_tokens are exactly what your wallet is charged for.
Streaming
Set stream: true to receive server-sent events. Chunks follow the OpenAI chat.completion.chunk format; the final chunk carries usage, then the stream closes with data: [DONE].
stream = client.chat.completions.create(
model="kyboro-swift-1",
messages=[{"role": "user", "content": "Explain async/await"}],
stream=True,
)
for chunk in stream:
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="", flush=True)Vision
Swift, Forge and Titan accept images. Use the OpenAI content-parts format with either a base64 data URI or a public https URL.
{
"model": "kyboro-forge-1",
"messages": [{
"role": "user",
"content": [
{"type": "text", "text": "What is wrong with this UI?"},
{"type": "image_url", "image_url": {"url": "data:image/png;base64,iVBOR..."}}
]
}]
}Tool calling
All models support function calling. Define tools in the OpenAI format; when the model decides to call one, the response has finish_reason: "tool_calls". Execute the function, append the result as a role: "tool" message, and call the API again.
{
"model": "kyboro-forge-1",
"messages": [{"role": "user", "content": "Weather in Mumbai?"}],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]
}
}
}]
}Models & pricing
Prices are USD per 1M tokens, billed against your prepaid wallet. Live list: GET /v1/models.
Errors
Errors use the OpenAI error envelope with a stable code:
{
"error": {
"message": "Insufficient credits. Top up your wallet at https://kyboro.com/dashboard/api.",
"type": "invalid_request_error",
"code": "insufficient_credits"
}
}| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | Missing, malformed, or revoked key. |
| 402 | insufficient_credits | Wallet empty — top up to resume. |
| 404 | model_not_found | Unknown model id — see GET /v1/models. |
| 429 | rate_limit_exceeded | Too many requests, or the key's daily spend limit was hit. |
| 500 | internal_error | Something failed on our side. Retry, or contact info@yinfocore.com. |
| 503 | service_unavailable | Temporarily unavailable — retry with backoff. |
Rate limits
Default: 60 requests/minute per key. Streaming responses count as one request. Hitting the limit returns 429 — back off and retry. Need more? Write to info@yinfocore.com with your use case and we'll raise your limits.
Ready to build?
Open your API dashboard