Other languages¶
Python and TypeScript are hand-crafted and idiomatic. For the other advertised languages — Go, Rust, Ruby, Java, Kotlin, Swift, PHP, C#, and a typed JS-fetch client — we generate clients from the same OpenAPI spec that powers this reference, so they're always in sync with the API.
Generate a client¶
# Generates clients into sdks/_generated/<lang> from the Agents OpenAPI spec.
# Requires either (java + npx) or docker — openapi-generator is a Java tool.
scripts/docs/gen-sdks.sh
The script runs openapi-generator against
docs/api-portal/docs/specs/telbox-agents-openapi.json. To add a language, add a
gen <generator> <out> <props> line to scripts/docs/gen-sdks.sh — every
generator openapi-generator supports
is available (go, rust, ruby, java, kotlin, swift5, php, csharp, …).
Or roll your own¶
The API is plain REST + JSON with Bearer auth, so any HTTP client works. The spec is the contract; the API reference is generated from it. The essentials:
- Base URL
https://api.telbox.ai, every path under/v1. Authorization: Bearer tb_live_…on every request.- An agent is an
AgentDefinitionIRJSON document — see Agents & the IR.