Using the OpenAI SDK with KiosAPI
KiosAPI is fully compatible with the official OpenAI SDK. This means you can drop in the libraries you already use, change the base URL, and immediately access every chat model KiosAPI offers — including non-OpenAI models.
Python SDK
Installation
Configuration
The base_url must include the /v1/ suffix. Omitting it will result in 404 Not Found errors.
Chat completion example
Streaming
Node.js SDK
Installation
Configuration
Chat completion example
Important notes
All chat models on KiosAPI — including non-OpenAI models — support the OpenAI official library. You don’t need a different SDK for Claude, Gemini, or any other model family. Just change the model parameter and keep the same client configuration.
base_url suffix requirement (Python): Always set base_url to https://kiosapi.com/v1/ with the trailing /v1/. Setting it to https://kiosapi.com or https://kiosapi.com/v1 (without the trailing slash) may cause request routing failures.
Next steps