AI HUB Docs
English
Console →
Getting Started

Quickstart

Make a first call. Replace the model with any published slug from the Models list.

curl https://console.aimodelhub.ai/v1/chat/completions \
  -H "Authorization: Bearer $AIHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic-claude-sonnet-4-6",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
from openai import OpenAI

client = OpenAI(
    api_key="sk-hub-...",
    base_url="https://console.aimodelhub.ai/v1",
)

resp = client.chat.completions.create(
    model="anthropic-claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.AIHUB_API_KEY,
  baseURL: "https://console.aimodelhub.ai/v1",
});

const resp = await client.chat.completions.create({
  model: "anthropic-claude-sonnet-4-6",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);

That is the whole loop: key in the header, a model and messages in the body, a completion back. Next, see the full request and response shape in the API reference.