Skip to content
docs/sdksGuides

SDKs

There is no first-party SDK. The API answers in shapes other people's clients already speak.

A wrapper around a JSON API this small would be more surface than it saves, so there is none. Instead the routes answer in the shapes the widely-used clients already send: an OpenAI client for chat, completions, embeddings and images, an Anthropic client for messages, and plain HTTP for the queue.

OpenAI clients

cURL
curl https://api.routehook.ai/v1/chat/completions \
  -H "Authorization: Bearer $ROUTEHOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [
      { "role": "user", "content": "Hello" }
    ]
  }'

What an OpenAI client can reach

chat.completions, completions, embeddings and images.generate all map onto routes that exist here. Anything else in that SDK (assistants, files, fine-tuning, the batch API) has no route behind it and will 404. The model field takes a slug from GET /v1/models, not an OpenAI model name.

Anthropic clients

JAVASCRIPT
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  baseURL: "https://api.routehook.ai",
  apiKey: process.env.ROUTEHOOK_API_KEY,
});

const message = await client.messages.create({
  model: "anthropic/claude-sonnet-4",
  max_tokens: 512,
  messages: [{ role: "user", content: "Hello" }],
});

console.log(message.content[0].text);

The queue

The queue is four routes and no library: submit, poll, fetch, cancel. The submit call below is the whole of the integration a video model needs. See the queue page for the polling loop and the status vocabulary.

Submitting a job

cURL
curl -X POST https://api.routehook.ai/v1/queue/fal/veo3 \
  -H "Authorization: Bearer $ROUTEHOOK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "drone shot over a harbour at dawn",
    "duration": 5
  }'