Request formats
OpenAI, Anthropic Messages, and Gemini formats — one key, three dialects.
The same Linkex key authenticates three request dialects. Use whichever your client already speaks; billing and logging are identical.
curl https://linkex.ai/v1/chat/completions \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "Hello"}],
"max_tokens": 256
}'Everything in the OpenAI dialect works: tools, response_format, vision content parts, stream_options, etc. This is the recommended default.
curl https://linkex.ai/v1/messages \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 256,
"messages": [{"role": "user", "content": "Hello"}]
}'Native Anthropic Messages shape — used by Claude Code and the Anthropic SDKs. Point ANTHROPIC_BASE_URL at https://linkex.ai (no /v1 suffix; the SDK adds the path).
curl "https://linkex.ai/v1beta/models/gemini-2.5-pro:generateContent" \
-H "Authorization: Bearer sk-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"parts": [{"text": "Hello"}]}]
}'Google's v1beta shape, including :streamGenerateContent for streaming.
You can call any model through any dialect — e.g. Claude via the OpenAI format. Linkex converts request/response shapes at the gateway; pointer-precise parameters (explicit zeros, penalties, etc.) are preserved in conversion.
Which format should I pick?
- Existing codebase or framework → keep whatever it already uses.
- New project → OpenAI format: widest tool support and the most battle-tested conversion path.
- Claude Code / Anthropic SDK users → Anthropic format with the base-URL override.