SDKS · OPENAI COMPATIBILITY
OpenAI compatibility
Hoonify is a drop-in replacement for the OpenAI chat.completions and models endpoints. If you can call openai.chat.completions.create(), you can call Hoonify — change two lines and ship.
The two-line migration
diff
# Python
- client = OpenAI()
+ client = OpenAI(
+ base_url="https://api.hoonify.ai/v1",
+ api_key=os.environ["HOONIFY_API_KEY"],
+ )
# TypeScript
- const client = new OpenAI();
+ const client = new OpenAI({
+ baseURL: "https://api.hoonify.ai/v1",
+ apiKey: process.env.HOONIFY_API_KEY!,
+ });What's compatible
| Surface | Notes |
|---|---|
| POST /v1/chat/completions | Full request and response shape, including streaming, tools, structured outputs, stop sequences. |
| GET /v1/models | Same envelope; Hoonify adds family / quantizations / context_window fields. |
| GET /v1/models/{id} | Same envelope. Adds deprecation field. |
| Server-Sent Events streaming | Identical chunk envelope. SDKs work without changes. |
| Tool / function calling | Same JSON-Schema tools array. Same tool_calls response shape. |
What's not supported (yet)
| Surface | Notes |
|---|---|
| Vision / image inputs | Roadmap. Today the API rejects content blocks with type image_url. |
| Audio (STT / TTS) | Not on the platform yet. Use a dedicated provider. |
| Realtime API | Not supported. Streaming over SSE is the live-token mechanism. |
| Assistants / threads | Hoonify is stateless. Bring your own state / vector store. |
| Batch API | Roadmap. For now, parallelize requests on chat completions. |
| File upload / fine-tuning | Roadmap. Hoonify serves stock open-weight checkpoints today; custom-weight hosting is coming. |
Model IDs
OpenAI model IDs (
gpt-4o, o3-mini, etc.) are not aliased on Hoonify — those are proprietary models we don't serve. Switch to one of the open-weight families: deepseek-v4-pro, qwen-3.6-27b, gemma-4-31b, kimi-k2. See the full list in Models.Pricing implications
Per-token pricing is set by the open-weight model, not the API call shape.
Related: Python SDK · TypeScript SDK