Start using INFERDEX
- Browse the model exchange. Metadata comes from OpenRouter’s public chat and embedding catalogs.
- Add your own OpenRouter key in Settings. The key is held in browser memory and cleared on reload.
- Select a model in the terminal, enter a prompt and review the cost estimate.
- Confirm the request. Your browser connects directly to OpenRouter; INFERDEX has no hosted inference API.
Ctrl/⌘ K opens the workspace command menu. History and conversations are memory-only unless you opt into local storage.
How requests and charges work
Published token prices are normalized to USD per million tokens in the exchange. Request estimates use roughly four text characters per input token and your maximum output setting. They exclude image, cache, request, reasoning and time-dependent charges where not calculable.
The router’s estimate ceiling is not a provider-enforced cap. Set actual key limits at OpenRouter. Stop attempts to abort the connection, but provider work may already be billable. Failed and cancelled requests can also cost money.
Advanced parameters are sent only when the selected model advertises support. Arena calls are parallel, separately billable requests. Retry is manual; no fallback automatically repeats a charge.
Latency and first-token time are measured in your browser, including network overhead. Token counts and costs are shown only when returned by the provider.
Direct provider examples
Use a model ID from the current catalog and a credential you own. Inference examples can incur charges. Keep server-side keys in environment secrets; never commit them or embed them in public code.
JavaScript
const response = await fetch('https://openrouter.ai/api/v1/chat/completions', {
method: 'POST',
headers: { Authorization: 'Bearer ' + apiKey, 'Content-Type': 'application/json' },
body: JSON.stringify({ model: selectedModelId,
messages: [{ role: 'user', content: 'Explain this concept.' }],
max_tokens: 512, stream: false })
});
if (!response.ok) throw new Error('Provider HTTP ' + response.status);
const result = await response.json();TypeScript
type ModelCatalog = { data: Array<{ id: string; name: string }> };
const response = await fetch('https://openrouter.ai/api/v1/models');
if (!response.ok) throw new Error('Catalog unavailable');
const catalog: ModelCatalog = await response.json();
console.log(catalog.data);Python
import os, json, urllib.request
body = json.dumps({
"model": os.environ["MODEL_ID"],
"messages": [{"role": "user", "content": "Hello"}],
"max_tokens": 512
}).encode()
request = urllib.request.Request(
"https://openrouter.ai/api/v1/chat/completions", data=body,
headers={"Authorization": "Bearer " + os.environ["OPENROUTER_API_KEY"],
"Content-Type": "application/json"})
with urllib.request.urlopen(request, timeout=60) as response:
print(json.load(response))curl
curl https://openrouter.ai/api/v1/models
# The following request may charge your provider account.
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"model":"YOUR_SELECTED_MODEL_ID","messages":[{"role":"user","content":"Hello"}],"max_tokens":512}'Robinhood Chain and x402
Mainnet: 4663. Testnet: 46630. Native gas: ETH. Wallet connection and read-only ETH/USDG balance checks are supported using official configuration.
Spraay’s live models and chat endpoints return x402 v2 exact USDG challenges for Robinhood mainnet. Its discovery document identifies an internal EIP-3009 facilitator. The token domain was verified by read-only RPC on October 18, 2026. Live settlement remains untested.
On the wallet page, fetch an unpaid quote, review the fixed recipient and exact charge, then explicitly authorize in your wallet. Quotes expire after 60 seconds; authorizations last at most two minutes. Price, asset, domain or recipient changes block payment. Submitted requests never retry automatically. A provider receipt is a claim to inspect on the explorer, not independent settlement confirmation.
Spraay prompts, responses and signatures pass through a fixed-resource INFERDEX relay because its browser CORS configuration omits v2 headers. The relay does not log or persist these contents. Pasted quotes and arbitrary marketplace listings remain inspection-only.
Robinhood network docs ↗SDK examples and provider integrations
These examples target the exact development dependencies in the lockfile: AI SDK 7, OpenAI-compatible provider 3 and LangChain OpenAI 1.6. Keys belong in your own process environment, never in client-side code. Calls are not run on import. Automatic retries are disabled. Model IDs must come from the selected provider’s current catalog.
ai-sdk.ts
import { generateText, streamText } from "ai";
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
// Node/TypeScript example. Install: pnpm add ai @ai-sdk/openai-compatible
// No call runs on import. Invoking these functions may charge your provider.
export type ExampleConfig = {
provider: "openrouter" | "chutes" | "groq";
apiKey: string;
modelId: string;
fetch?: typeof fetch;
};
const bases = {
openrouter: "https://openrouter.ai/api/v1",
chutes: "https://llm.chutes.ai/v1",
groq: "https://api.groq.com/openai/v1",
};
function model(config: ExampleConfig) {
if (!config.apiKey.trim() || !config.modelId.trim())
throw Error("Supply your provider key and a current text model ID.");
const provider = createOpenAICompatible({
name: config.provider,
baseURL: bases[config.provider],
apiKey: config.apiKey,
fetch: config.fetch,
});
return provider.chatModel(config.modelId);
}
export async function generateWithSdk(config: ExampleConfig, prompt: string) {
return generateText({
model: model(config),
prompt,
maxOutputTokens: 512,
maxRetries: 0,
abortSignal: AbortSignal.timeout(60000),
});
}
export function streamWithSdk(config: ExampleConfig, prompt: string) {
return streamText({
model: model(config),
prompt,
maxOutputTokens: 512,
maxRetries: 0,
abortSignal: AbortSignal.timeout(60000),
});
}
// Explicit usage in your own script:
// const result = await generateWithSdk({ provider: "openrouter", apiKey: process.env.OPENROUTER_API_KEY!, modelId: process.env.MODEL_ID! }, "Hello");
// console.log(result.text);
// const stream = streamWithSdk(config, "Hello");
// for await (const chunk of stream.textStream) process.stdout.write(chunk);
langchain.ts
import { ChatOpenAI } from "@langchain/openai";
// Node/TypeScript example. Install: pnpm add @langchain/openai @langchain/core
// No call runs on import. Invoke only with your own key and billing authorization.
export function createLangChainModel(config: {
apiKey: string;
modelId: string;
provider: "openrouter" | "chutes" | "groq";
fetch?: typeof fetch;
}) {
if (!config.apiKey.trim() || !config.modelId.trim())
throw Error("Supply a provider key and a current text model ID.");
const baseURL = {
openrouter: "https://openrouter.ai/api/v1",
chutes: "https://llm.chutes.ai/v1",
groq: "https://api.groq.com/openai/v1",
}[config.provider];
return new ChatOpenAI({
apiKey: config.apiKey,
model: config.modelId,
maxTokens: 512,
maxRetries: 0,
timeout: 60000,
configuration: { baseURL, fetch: config.fetch },
});
}
// Explicit usage in your own script (may charge your provider):
// const model = createLangChainModel({ provider: "openrouter", apiKey: process.env.OPENROUTER_API_KEY!, modelId: process.env.MODEL_ID! });
// const reply = await model.invoke("Hello");
// console.log(reply.content);
// for await (const chunk of await model.stream("Hello")) process.stdout.write(String(chunk.content));
INFERDEX does not expose its own MCP server. Use each provider’s official integration and authentication instructions. These links are guides, not claims that INFERDEX runs those services.
Direct OpenAI, Anthropic, Chutes and Groq text adapters are available in Direct providers. Use their separate keys in Settings. OpenRouter handles other providers and image/video generation. INFERDEX does not provide a hosted public submission API or an MCP server, and does not execute tools returned by models.
Troubleshooting
- 401 — Authentication
- Replace or check your provider key in Settings.
- 402 — Provider balance
- Review your provider account. INFERDEX never purchases credits for you.
- 429 — Rate limited
- Wait before manually retrying. No automatic inference retry is made.
- Catalog / registry failure
- Retry discovery. No sample results are substituted during outages.
- Wallet network mismatch
- Switch to Robinhood mainnet in the wallet page. No signing is necessary to view balances.