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

SurfaceNotes
POST /v1/chat/completionsFull request and response shape, including streaming, tools, structured outputs, stop sequences.
GET /v1/modelsSame envelope; Hoonify adds family / quantizations / context_window fields.
GET /v1/models/{id}Same envelope. Adds deprecation field.
Server-Sent Events streamingIdentical chunk envelope. SDKs work without changes.
Tool / function callingSame JSON-Schema tools array. Same tool_calls response shape.

What's not supported (yet)

SurfaceNotes
Vision / image inputsRoadmap. Today the API rejects content blocks with type image_url.
Audio (STT / TTS)Not on the platform yet. Use a dedicated provider.
Realtime APINot supported. Streaming over SSE is the live-token mechanism.
Assistants / threadsHoonify is stateless. Bring your own state / vector store.
Batch APIRoadmap. For now, parallelize requests on chat completions.
File upload / fine-tuningRoadmap. 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