ドキュメント
ApigatorはOpenAI互換です。任意のOpenAI SDKを base URL に向け、Apigatorキーを渡すだけで、チャット・画像・音声・埋め込み・判断など数百のモデルをひとつのエンドポイントから呼び出せます。
タスクのレシピやツール連携(LangChain、Vercel AI SDK、Cursor、Cline)をお探しですか?Cookbookをご覧ください。
カード不要——作成したてのキーで無料モデルが動きます。
ダッシュボードでキーを取得し、すぐに無料モデルで最初の呼び出しを行えます——課金は $0 なので、チャージは不要です。さらに新規アカウントには $0.042 のクレジット(Jev 判断モデル約 100 万トークン分)が付与されます。残高を追加すれば有料モデルが解放されます。
curl https://api.apigator.ai/v1/chat/completions \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"free/nemotron-nano-30b","messages":[{"role":"user","content":"Hello from Apigator!"}]}'from openai import OpenAI
client = OpenAI(base_url="https://api.apigator.ai/v1", api_key="sk-YOUR_KEY")
resp = client.chat.completions.create(
model="free/nemotron-nano-30b", # free — no balance needed
messages=[{"role": "user", "content": "Hello from Apigator!"}],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.apigator.ai/v1", apiKey: "sk-YOUR_KEY" });
const r = await client.chat.completions.create({
model: "free/nemotron-nano-30b", // free — no balance needed
messages: [{ role: "user", content: "Hello from Apigator!" }],
});
console.log(r.choices[0].message.content); free/nemotron-nano-30bfree/nemotron-super-120bfree/gemma-4-31b base URLを差し替えるだけ——連携はこれで完了です。言語を選んでください:
curl https://api.apigator.ai/v1/chat/completions \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o","messages":[{"role":"user","content":"Hello!"}]}'from openai import OpenAI
client = OpenAI(base_url="https://api.apigator.ai/v1", api_key="sk-...")
resp = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.apigator.ai/v1", apiKey: "sk-..." });
const r = await client.chat.completions.create({
model: "gpt-4o",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(r.choices[0].message.content); Base URL https://api.apigator.ai/v1 · 認証 Authorization: Bearer sk-YOUR_KEY (ダッシュボードでキーを取得)。
すべてがチャットではありません。/models の各モデルには、使用するエンドポイントが記載されています——適切なものを選んでください。base URLもキーも同じです。
| モダリティ | エンドポイント | モデルIDの例 |
|---|---|---|
| チャット | POST /v1/chat/completions | gpt-4o |
| 画像生成 | POST /v1/images/generations | openai/gpt-image-1, fal_ai/fal-ai/flux/schnell |
| 音声合成(TTS) | POST /v1/audio/speech | elevenlabs-tts |
| 音声認識(STT) | POST /v1/audio/transcriptions | groq/whisper-large-v3 |
| 埋め込み | POST /v1/embeddings | openai/text-embedding-3-small |
| 動画生成(非同期) | POST /v1/videos | gemini/veo-3.1-fast-generate-preview |
| 判断モデル(Jev) | POST /typesafe/v1/systemone | jev-latest |
Pythonのサンプルは、クイックスタートの client を前提としています。
curl https://api.apigator.ai/v1/images/generations \
-H "Authorization: Bearer sk-..." \
-d '{"model":"openai/gpt-image-1","prompt":"a red crocodile mascot","n":1}'client.images.generate(model="openai/gpt-image-1", prompt="a red crocodile mascot", n=1)const img = await client.images.generate({
model: "openai/gpt-image-1",
prompt: "a red crocodile mascot",
n: 1,
}); curl https://api.apigator.ai/v1/embeddings \
-H "Authorization: Bearer sk-..." \
-d '{"model":"openai/text-embedding-3-small","input":"hello world"}'client.embeddings.create(model="openai/text-embedding-3-small", input="hello world")const e = await client.embeddings.create({
model: "openai/text-embedding-3-small",
input: "hello world",
}); curl https://api.apigator.ai/v1/audio/speech \
-H "Authorization: Bearer sk-..." \
-d '{"model":"elevenlabs-tts","input":"Hello","voice":"21m00Tcm4TlvDq8ikWAM"}' \
--output speech.mp3with client.audio.speech.with_streaming_response.create(
model="elevenlabs-tts", voice="21m00Tcm4TlvDq8ikWAM", input="Hello",
) as r:
r.stream_to_file("speech.mp3")import fs from "fs";
const mp3 = await client.audio.speech.create({
model: "elevenlabs-tts", voice: "21m00Tcm4TlvDq8ikWAM", input: "Hello",
});
fs.writeFileSync("speech.mp3", Buffer.from(await mp3.arrayBuffer())); voice はElevenLabsのvoice id(名前ではありません)を指定してください。音声の詳しいガイド: /audio.md。
curl https://api.apigator.ai/typesafe/v1/systemone \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{"model":"jev-latest","state":"Help! My payouts have been failing for 3 days.",
"questions":{"is_urgent":{"type":"noul","instructions":"Does this convey urgency?"},
"department":{"type":"choice","instructions":"Which team should handle this?",
"criteria":{"billing":"Payments","technical":"Bugs","sales":"Pricing"}}}}'
# -> {"answers":{"is_urgent":{"type":"noul","noul":0.95},
# "department":{"type":"choice","choice":"billing","probabilities":{...},"confidence":0.81}}, ...}import requests
r = requests.post(
"https://api.apigator.ai/typesafe/v1/systemone",
headers={"Authorization": "Bearer sk-..."},
json={"model": "jev-latest",
"state": "Help! My payouts have been failing for 3 days.",
"questions": {"is_urgent": {"type": "noul", "instructions": "Does this convey urgency?"}}},
)
print(r.json()["answers"]["is_urgent"]["noul"]) # 0.95 = P(yes)const r = await fetch("https://api.apigator.ai/typesafe/v1/systemone", {
method: "POST",
headers: { Authorization: "Bearer sk-...", "Content-Type": "application/json" },
body: JSON.stringify({
model: "jev-latest",
state: "Help! My payouts have been failing for 3 days.",
questions: { is_urgent: { type: "noul", instructions: "Does this convey urgency?" } },
}),
});
console.log((await r.json()).answers.is_urgent.noul); // 0.95 = P(yes) OpenAI Chat Completions 仕様に準拠しています。GPT-5 系列での検証結果(2026 年 9 月):
tools / tool_choice — /v1/chat/completions で function calling が使えます。reasoning_effort との併用も可能です。 reasoning_effort — low / medium / high / xhigh。省略するとモデルの既定値になります。 response_format — JSON mode と structured outputs。 max_completion_tokens — 推論モデルでは max_tokens ではなくこちらを使ってください。 verbosity — /v1/chat/completions では受け付けません。送ると 400「does not support parameters」になります。 すべてのモデルは POST https://api.apigator.ai/v1/responses でも OpenAI Responses 形式で呼び出せます。GPT-5 / GPT-6 系列は chat/completions にそのまま function tools を渡せます(ゲートウェイが Responses API に変換します)。chat/completions で tools が拒否されるモデルがあれば、同じ tools を /v1/responses に送ってください。
apigator.ai/models で呼び出し可能な全モデル(料金と各モデルが使用するエンドポイント付き)を閲覧できます。または GET https://api.apigator.ai/v1/models を呼び出してください。Claude以外はすべて、既定で各キーに開放されています。Claudeは許可リスト制で、専用のAnthropic互換エンドポイントで動作します——Claude Code CLI をご覧ください。
ユーザー向けにクライアントを実装していますか?これらの生のmarkdownファイルを取得し、そのとおりに実行してください。
401 — キーが未指定または無効です。403 claude_not_allowed — このキーではClaudeが有効化されていません(MixerBoxに許可リストへの追加を依頼してください)。400 — 不正なリクエスト(例:Perplexityの最小 max_tokens などプロバイダー側の制約)。404 model not available — 上流で有効化されていないIDです。/models から別のものを選んでください。400 does not support parameters — このルートで受け付けないパラメータが含まれています(上記「OpenAI 互換パラメータ」参照)。削除するか /v1/responses を使ってください。