API Documentation
JuntoRouter is fully compatible with the OpenAI API format. Use your API key to get started.
Sign in and go to API Keys to create a new key.
Your API key looks like: sk-junto-xxxxxxxxxxxx
Keep your key safe. It will only be shown once when created.
junto uses the same format as the OpenAI API. Just change the base URL and use your junto API key.
curl https://juntorouter-api.moonshine-studio.net/api/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o-mini",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'Python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://juntorouter-api.moonshine-studio.net/api/v1"
)
response = client.chat.completions.create(
model="openai/gpt-4o-mini",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)Node.js / TypeScript
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_API_KEY",
baseURL: "https://juntorouter-api.moonshine-studio.net/api/v1",
});
const response = await client.chat.completions.create({
model: "anthropic/claude-sonnet-4-5",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);Browse all models at Models. Use the model slug as the model parameter.
openai/gpt-4oopenai/gpt-4o-minianthropic/claude-sonnet-4-5anthropic/claude-haiku-4-5google/gemini-2.0-flashgoogle/gemini-2.0-proAppend a suffix to any model to control routing behavior:
:nitroRoute to the fastest provider (highest throughput):floorRoute to the cheapest provider (lowest price):onlineAugment prompt with web search results:thinkingEnable extended reasoning (Anthropic models)// Use the fastest provider for GPT-4o
{ "model": "openai/gpt-4o:nitro" }
// Use the cheapest provider
{ "model": "openai/gpt-4o:floor" }Add stream: true to get Server-Sent Events (SSE):
curl https://juntorouter-api.moonshine-studio.net/api/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-4-5",
"messages": [{"role": "user", "content": "Tell me a story"}],
"stream": true
}'Control routing with the provider object:
{
"model": "openai/gpt-4o",
"messages": [...],
"provider": {
"order": ["anthropic", "openai"],
"allow_fallbacks": true,
"data_collection": "deny",
"require_parameters": true
}
}order — Provider priority order
allow_fallbacks — Allow fallback to other providers
data_collection — "deny" = only no-data-collection providers
zdr — true = only Zero Data Retention providers
require_parameters — Only route to providers supporting all request params
JuntoRouter supports image, audio, and video generation through dedicated endpoints.
Image Generation
curl https://juntorouter-api.moonshine-studio.net/api/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-image-1",
"prompt": "A futuristic city skyline at sunset",
"size": "1024x1024",
"n": 1
}'Parameters: model (required), prompt (required), size, n, quality, style
Audio Speech (TTS)
curl https://juntorouter-api.moonshine-studio.net/api/v1/audio/speech \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/tts-1",
"input": "Hello, welcome to JuntoRouter!",
"voice": "alloy"
}' --output speech.mp3Parameters: model (required), input (required), voice (alloy, echo, fable, onyx, nova, shimmer), speed, response_format
Video Generation
curl https://juntorouter-api.moonshine-studio.net/api/v1/video/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/veo-3.1-fast-generate-preview",
"prompt": "A cat playing piano in a jazz club",
"size": "720p",
"duration": 4,
"response_format": "b64_json"
}' \
--max-time 300Video generation is synchronous but may take 1–5 minutes. Keep the client timeout generous (--max-time 300 for curl).
Parameters
model(required) — model slug, e.g.google/veo-3.1-fast-generate-previewprompt(required) — text description of the videoduration— integer seconds. Veo supports4,6, or8size— either a resolution ("720p","1080p","4K","1920x1080") or an aspect ratio ("16:9","9:16"). Resolution is required for Veo to return a video; if you only pass an aspect ratio the response may be empty.response_format—"url"(default) returns a provider download link that may require a provider API key to fetch;"b64_json"returns the video as base64 indata[0].b64_json. Use b64_json if you don't have the upstream key.
Pricing & billing notes
- Veo 3.1 Fast: ~320 J coins/sec at 720p, ~384 J coins/sec at 1080p, ~960 J coins/sec at 4K (rounded; exact rate uses the live USD→J-coin conversion). Billing uses the actual output resolution.
- Veo 3.x always includes audio — it's priced into the per-second rate, not a separate toggle.
- Only successful generations are billed today. A provider failure returns an error and no credit deduction.
- Cost appears in the response
costfield as J coins (the customer-facing unit; see pricing). It is deducted from your personal or team balance depending on the API key.
Example response (response_format: "b64_json")
{
"created": 1776589741,
"model": "google/veo-3.1-fast-generate-preview",
"provider": "google",
"data": [
{
"b64_json": "AAAAGGZ0eXBtcDQyAAAAAGlzb20=...", // base64 MP4
"content_type": "video/mp4"
}
],
"cost": 1280, // J coins for the whole call
"usage": { "units": 4, "unitType": "second", "resolution": "720p" }
}Media Response Format
{
"data": [
{
"b64_json": "iVBORw0KGgo...", // base64-encoded media
"url": "https://...", // or a download URL
"content_type": "image/png"
}
],
"model": "openai/gpt-image-1",
"cost": 134.4 // J coins
}Responses include a data array with b64_json or url, plus a cost field in J coins (rounded to 2 decimals). Audio speech returns binary audio directly (not JSON).

