Models & Providers
Access 300+ AI models through AICredits. Understand provider routing, model ID formats, heuristic detection, and automatic fallback chains.
Use this page with an AI assistant
Opens a new chat with this docs URL and the correct AICredits base URLs.
AICredits supports 300+ models across multiple providers through a single API.
Supported Providers
| Provider | Example Models | Routing |
|---|---|---|
| OpenAI | gpt-4o, gpt-4o-mini, o1, o3-mini | Direct |
| Anthropic | anthropic/claude-sonnet-4.5, anthropic/claude-sonnet-4.6, anthropic/claude-haiku-4.5 | Direct |
gemini-2.0-flash, gemini-2.5-pro | Direct | |
| DeepSeek | deepseek-chat, deepseek-reasoner | Direct |
| Mistral | mistral-large, mistral-small | Direct |
| xAI | grok-2, grok-3-mini | Direct |
| More | 300+ models via aggregation | Aggregated |
Reasoning models require a higher max_tokens budget
Models that perform internal reasoning (e.g. openai/o1, openai/o3-mini, deepseek/deepseek-reasoner) consume their thinking tokens from the same max_tokens pool as the visible response. If the limit is too low, the model may exhaust all available tokens during its thinking phase and return an empty response — even though tokens were consumed and billed. Set max_tokens to at least 4096 (and ideally 8000–16000) when using reasoning models.
Model ID Format
You can specify models in two ways: explicit (recommended) or heuristic.
Explicit Format (Recommended)
Use the provider/model-name format for unambiguous routing:
"model": "openai/gpt-4o-mini"
"model": "anthropic/claude-sonnet-4.5"
"model": "google/gemini-2.0-flash"
"model": "deepseek/deepseek-chat"
"model": "mistral/mistral-large-latest"
"model": "xai/grok-2"Heuristic Format
You can also pass just the model name. AICredits will auto-detect the provider based on the prefix:
| Prefix | Detected Provider | Example |
|---|---|---|
gpt-, o1-, o3- | OpenAI | gpt-4o-mini |
claude- | Anthropic | anthropic/claude-sonnet-4.5 |
gemini- | gemini-2.0-flash | |
deepseek- | DeepSeek | deepseek-chat |
mistral- | Mistral | mistral-large-latest |
grok- | xAI | grok-2 |
| other | Auto-routed | any unrecognized model |
Use the explicit format for production applications. Heuristic detection is convenient for quick testing but may route unexpectedly for ambiguous names.
Provider Routing
AICredits uses a shadow routing system that automatically handles provider failures. When you make a request, it follows a chain of providers to maximize availability.
Fallback Chain
1. Primary Provider — Direct API call to the provider (e.g., OpenAI, Anthropic) with round-robin key selection.
2. Secondary Provider — If the primary is unavailable, AICredits automatically falls back to an alternative route at no extra cost when possible.
3. Fallback Provider — Last resort fallback through an aggregated provider pool for maximum availability.
This fallback is automatic and transparent. You always receive a response as long as any provider in the chain is available.
Circuit Breaker
AICredits tracks the health of each provider key. If a key fails multiple times, it's temporarily marked as unhealthy and skipped for 30 seconds. This prevents repeated failures from adding latency to your requests.
Model Fallback
Send a models array instead of a single model to enable automatic cross-model fallback. If the first model fails (5xx, rate limit, or model unavailable), the request is automatically retried on the next model — transparently, with no extra code in your application.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.aicredits.in/v1",
apiKey: "sk-your-aicredits-key",
});
const response = await client.chat.completions.create({
// @ts-expect-error — AICredits extension
models: ["gpt-4o", "anthropic/claude-sonnet-4.5", "gemini-1.5-pro"],
messages: [{ role: "user", content: "Hello!" }],
});
// Check which model actually responded
console.log(response.model);from openai import OpenAI
client = OpenAI(
base_url="https://api.aicredits.in/v1",
api_key="sk-your-aicredits-key",
)
response = client.chat.completions.create(
# models[] is an AICredits extension — pass as extra_body
model="gpt-4o", # required by SDK; overridden by models[] below
extra_body={
"models": ["gpt-4o", "anthropic/claude-sonnet-4.5", "gemini-1.5-pro"]
},
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.model) # which model actually respondedcurl https://api.aicredits.in/v1/chat/completions \
-H "Authorization: Bearer sk-your-aicredits-key" \
-H "Content-Type: application/json" \
-d '{
"models": ["gpt-4o", "anthropic/claude-sonnet-4.5", "gemini-1.5-pro"],
"messages": [{"role": "user", "content": "Hello!"}]
}'Billing uses whichever model actually responds. The model field in the response tells you which one was used. List up to 3 models — the fallback chain is tried in the order you provide.
Browse Models
View all available models with real-time pricing on the Models page, or query the API:
# Public model catalog endpoint (outside OpenAI /v1 base URL)
curl https://api.aicredits.in/api/models