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

python
# 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.

http
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.

FieldTypeNotes
modelstringOne of the model ids below. Required.
messagesarrayOpenAI chat format: system / user / assistant / tool. Required.
streambooleanServer-sent events when true. Default false.
max_tokensintegerOutput cap, 1–16000. Default 4096.
toolsarrayOpenAI 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].

python
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.

json
{
  "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.

json
{
  "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:

json
{
  "error": {
    "message": "Insufficient credits. Top up your wallet at https://kyboro.com/dashboard/api.",
    "type": "invalid_request_error",
    "code": "insufficient_credits"
  }
}
StatusCodeMeaning
401invalid_api_keyMissing, malformed, or revoked key.
402insufficient_creditsWallet empty — top up to resume.
404model_not_foundUnknown model id — see GET /v1/models.
429rate_limit_exceededToo many requests, or the key's daily spend limit was hit.
500internal_errorSomething failed on our side. Retry, or contact info@yinfocore.com.
503service_unavailableTemporarily 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.