vexer API
One API key for Claude, Grok and GPT. Fully compatible with the OpenAI and Anthropic APIs, so it drops into the tools you already use — the terminal, your editor, Claude Code, or any SDK. Requests are billed per token against your credit balance; no subscription.
Base URLs
OpenAI-compatible: https://vexer.chat/v1 Anthropic-compatible: https://vexer.chat (SDK appends /v1/messages)
Authentication
Create a key at /sign-up (starts with vx-). Send it as Authorization: Bearer vx-… or x-api-key: vx-….
Models
autoRouter — picks a model per requestclaude-opus-4-8Anthropic — deepest reasoningclaude-sonnet-5Anthropic — fast, balancedclaude-fable-5Anthropic — creative writinggrok-4.5xAIgpt-5.6-solOpenAIOpenAI-compatible — chat completions
curl https://vexer.chat/v1/chat/completions \
-H "Authorization: Bearer $VEXER_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"messages": [{"role": "user", "content": "Hello in one sentence."}],
"stream": false
}'OpenAI SDK (Python)
from openai import OpenAI
client = OpenAI(api_key="vx-...", base_url="https://vexer.chat/v1")
resp = client.chat.completions.create(
model="claude-opus-4-8",
messages=[{"role": "user", "content": "Explain quantum tunneling briefly."}],
)
print(resp.choices[0].message.content)OpenAI SDK (JavaScript)
import OpenAI from "openai";
const client = new OpenAI({ apiKey: "vx-...", baseURL: "https://vexer.chat/v1" });
const r = await client.chat.completions.create({
model: "grok-4.5",
messages: [{ role: "user", content: "Give me a haiku about the sea." }],
});
console.log(r.choices[0].message.content);Anthropic-compatible — messages
curl https://vexer.chat/v1/messages \
-H "x-api-key: $VEXER_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-8",
"max_tokens": 512,
"messages": [{"role": "user", "content": "Hi"}]
}'Automatic routing & fallback
Pass "model": "auto" to let vexer pick a model per request — hard, long, or code-heavy prompts route to the deepest model, the rest to a fast default. Every model also has a fallback: if the chosen provider is unavailable, the request reroutes before any token streams. The response always reports the model that actually ran (the model field, and the X-Model header on the chat endpoint), so you can see which route handled it. Unknown model ids that look like a known family (e.g. gpt-4o, claude-3-5-haiku) map to the nearest vexer model, so existing clients work unchanged. See the routing guide and the model catalog.
Images (vision)
Send images alongside text on either endpoint. Use a public URL or a base64 data: URI. Vision-capable Claude and GPT models can read them; the vexer chat UI also supports attaching or pasting images.
# OpenAI-compatible — image_url part
curl https://vexer.chat/v1/chat/completions \
-H "Authorization: Bearer $VEXER_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-8",
"messages": [{"role": "user", "content": [
{"type": "text", "text": "What is in this image?"},
{"type": "image_url", "image_url": {"url": "https://example.com/cat.jpg"}}
]}]
}'
# Anthropic-compatible — image source block (base64 or url)
curl https://vexer.chat/v1/messages \
-H "x-api-key: $VEXER_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4-8",
"max_tokens": 512,
"messages": [{"role": "user", "content": [
{"type": "text", "text": "Describe this."},
{"type": "image", "source": {"type": "url", "url": "https://example.com/cat.jpg"}}
]}]
}'Claude Code & the Anthropic SDK
Point the Anthropic base URL at vexer and use your vexer key:
export ANTHROPIC_BASE_URL="https://vexer.chat" export ANTHROPIC_API_KEY="vx-..." # then run your Anthropic-based tool, e.g.: claude
Streaming
Set "stream": true. The OpenAI endpoint returns chat.completion.chunk SSE events ending in data: [DONE]; the Anthropic endpoint returns the standard message_start → content_block_delta → message_stop event sequence.
Pricing & limits
- Billed per token against your credit balance — top up in the app, no subscription.
- Max output:
8192tokens per request. - Rate limits and a daily spend cap apply per account.
- List models any time:
GET https://vexer.chat/v1/models.