AI Fusion

AI Fusion docs

An OpenAI-compatible gateway aggregating free-tier API access across 4 providers and 31 models. Three steps: sign up, mint a token, POST to /v1/chat/completions.

Quickstart

Point any OpenAI-SDK-compatible client at https://ai.viktorarsov.com/v1 and supply your project token as the API key.

from openai import OpenAI

client = OpenAI(
    base_url="https://ai.viktorarsov.com/v1",
    api_key="afp_live_…",
)
resp = client.chat.completions.create(
    model="gateway:fast-free",
    messages=[{"role": "user", "content": "Say hi."}],
)
print(resp.choices[0].message.content)
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://ai.viktorarsov.com/v1",
  apiKey: "afp_live_…",
});
const resp = await client.chat.completions.create({
  model: "gateway:fast-free",
  messages: [{ role: "user", content: "Say hi." }],
});
console.log(resp.choices[0].message.content);
curl https://ai.viktorarsov.com/v1/chat/completions \
  -H "Authorization: Bearer afp_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gateway:fast-free",
    "messages": [{"role": "user", "content": "Say hi."}]
  }'

Models & aliases

You can address a model three ways:

  • Alias — gateway:fast-free, gateway:best-free-chat. Resolves to a ranked list. Recommended.
  • Provider-qualified — groq/openai/gpt-oss-120b. Pin to one provider.
  • Bare — llama-3.3-70b. Matches across providers by display name.

Aliases

SlugKindDescriptionFallbacks
auto alias DEFAULT. Capacity-tiered spiral: bulk pools first, then quality, then overflow — across all 4 live sources and every key. 48
best-free-chat alias Best-quality free chat. Leads with the strongest model that is both live and fast, then widens into the bulk pools. 7
code-free alias Coding-tuned models (autocomplete, refactor, explain). 6
deepseek-ai/deepseek-v4-flash alias Compat shim: the bare deepseek-v4-flash id was EOL'd upstream (410) and renamed to the dated -0731 build. Routes to that. NOTE ~26-35s cold start, so treat as a background tier. 2
embed-cheap alias Free-tier embeddings: Gemini gemini-embedding-001 (768-dim). 1
fast-free alias High-volume workhorse. Capacity-first: the biggest daily ceilings lead so bulk traffic never touches the scarce Flash pools. 7
gpt-4o-mini alias OpenAI-name compatibility shim → nearest free equivalent (GPT-OSS 120B). Lets unmodified OpenAI clients hit the gateway. 3
long-context alias Very large context windows (>=256K, several at 1M). 6
openai/gpt-4o-mini alias OpenAI-name compatibility shim → nearest free equivalent (GPT-OSS 120B). Lets unmodified OpenAI clients hit the gateway. 3
reasoning alias Stronger reasoning. Fast reasoners lead; the heavy NIM models (26-92s cold start) are a deliberate tail, not a leader. 7
vision alias Multimodal (image input) capable models. 6

The gateway rotates through each alias's fallback chain automatically on quota / cooldown. Chains may include paid models as last-resort fallbacks; routing prefers free providers first based on live cost-score.

Raw models

31 models. Free models show $0.00. Full OpenAPI schema at /docs.

ProviderModel idDisplayContext$/Mtok in$/Mtok out
nvidia_nim moonshotai/kimi-k3 Kimi K3 (NIM) 256000 free free
nvidia_nim nvidia/nemotron-3-super-120b-a12b Nemotron 3 Super 120B (NIM) 1000000 free free
openrouter minimax/minimax-m3:free MiniMax M3 (free, 1M ctx, multimodal) 1048576 free free
nvidia_nim mistralai/mistral-nemotron Mistral Nemotron (NIM, ~120s) 128000 free free
openrouter nvidia/nemotron-3-super-120b-a12b:free Nemotron 3 Super 120B (free) 262144 free free
openrouter nvidia/nemotron-3.5-lightning:free Nemotron 3.5 Lightning (free, 1M ctx, SLOW) 1000000 free free
cerebras gpt-oss-120b GPT-OSS 120B (Cerebras, paid) 131072 free free
openrouter minimax/minimax-m2.7:free MiniMax M2.7 (free) 196608 free free
groq qwen/qwen3.8-27b Qwen3.8 27B (Groq, 2M TPD) 131042 free free
openrouter google/gemma-4-31b-it:free Gemma 4 31B (OR, free) 262144 free free
cerebras gemma-4-31b Gemma 4 31B (Cerebras, paid) 262144 free free
gemini gemma-4-31b-it Gemma 4 31B (Gemini API, 30 RPM / 14.4K RPD) 262144 free free
nvidia_nim meta/llama-3.2-90b-vision-instruct Llama 3.2 90B Vision (NIM, ~17s) 128000 free free
openrouter dots-studio/dots-3-note-preview:free Dots 3 Note (free, 512K, vision) 512000 free free
openrouter nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free Nemotron 3 Nano Omni 30B (free, audio+video in) 256000 free free
freellmapi auto Aggregator auto-pick 8192 free free
no_cost_ai auto Aggregator auto-pick 8192 free free
openrouter poolside/laguna-s-2.1:free Poolside Laguna S 2.1 (free, code) 262144 free free
openrouter cohere/north-mini-code:free Cohere North Mini Code (free) 256000 free free
gemini gemini-embedding-2 Gemini Embedding 2 (768-dim, 8K ctx) 8192 free free
gemini gemini-embedding-001 Gemini Embedding 001 (768-dim, legacy) 2048 free free
gemini gemma-4-26b-a4b-it Gemma 4 26B A4B (Gemini API, 30 RPM / 14.4K RPD) 262144 free free
nvidia_nim nvidia/nemotron-3.5-lightning-30b-a3b Nemotron 3.5 Lightning 30B (NIM) 131072 free free
openrouter inclusionai/ling-3.0-flash-fin:free Ling 3.0 Flash (free) 262144 free free
nvidia_nim openai/gpt-oss-20b GPT-OSS 20B (NIM) 128000 free free
groq openai/gpt-oss-20b GPT-OSS 20B (Groq) 131072 free free
groq openai/gpt-oss-safeguard-20b GPT-OSS Safeguard 20B (Groq, moderation) 131072 free free
openrouter liquid/lfm-2.5-2.6b:free Liquid LFM 2.5 2.6B (free, tiny) 65536 free free
nvidia_nim deepseek-ai/deepseek-v4-pro-0813 DeepSeek V4 Pro (NIM, ~92s) 1000000 free free
nvidia_nim nvidia/nemotron-3-ultra-550b-a55b Nemotron 3 Ultra 550B (NIM, 1M ctx) 1000000 free free
nvidia_nim deepseek-ai/deepseek-v4-flash-0731 DeepSeek V4 Flash (NIM, ~26s) 1000000 free free

Error shapes

All errors return a uniform JSON envelope and an HTTP status matching the failure class.

{
  "error": {
    "type": "rate_limit_exceeded",
    "message": "Provider quota exhausted; try again in 30s.",
    "request_id": "req_01H…",
    "retry_after_s": 30
  }
}

Error types

TypeStatusMeaning
authentication_failed401Missing or invalid project token.
rate_limit_exceeded429RPM, daily or monthly cap hit. See retry_after_s.
pool_exhausted429Every upstream key is cooling. See next_slot_eta_s.
model_unavailable404Unknown model or alias resolution is empty.
upstream_error502All attempts failed with a 5xx at the provider.
bad_request400Malformed OpenAI-shape body or guardrail rejection.

Headers & rate limits

Every successful response carries x-gateway-* metadata so you can see which key answered and at what cost without enabling extra logging.

Response headers

HeaderMeaning
x-gateway-providerSlug of the provider that answered.
x-gateway-modelFinal upstream model id used.
x-gateway-attemptsHow many (key, model) pairs were tried.
x-gateway-latency-msWall-clock time from ingress to first byte.
x-gateway-tokensTotal tokens counted for this request.
x-gateway-cost-usdUSD cost in our accounting.
x-gateway-request-idUUID for cross-referencing in your logs.
Retry-AfterSeconds until next attempt, on 429/503.

Rate limits

Per-tenant limits come from your plan: RPM, monthly requests, monthly tokens. When the RPM bucket is full, the gateway either waits up to max_wait_ms and retries, or returns 429 with next_slot_eta_s.

Idempotency & retries

The gateway retries transient upstream failures automatically (up to 2 per attempt, up to N providers). Your own retries should use an Idempotency-Key header so we can deduplicate if our SSE disconnects mid-stream.