OPENAI COMPATIBLE

What Is an OpenAI-Compatible API? Scope and Limits

OpenAI-compatible APIs reuse some SDK request formats, but do not guarantee compatibility across every model, endpoint or feature. Compare Chat Completions, Responses, Anthropic Messages and native Gemini endpoints, then follow Link's integration checks.

ANSWER FIRST

Remember these four things first

Confirm the API protocol and supporting evidence before changing configurations or switching services.

  1. 01

    Use https://www.aifast.link/v1 as the OpenAI-compatible Base URL; check whether the client appends another /v1.

  2. 02

    Read /v1/models under the same Link account and copy an available GPT, Claude or Gemini model ID.

  3. 03

    Verify Chat Completions first, then test SSE, tool calls and usage separately. Do not infer other protocol support from one successful chat.

  4. 04

    GPT/Claude monthly plans apply only to specified groups and reset their allowances daily. Gemini uses a separate group and is not included in these plans.

What does an OpenAI-compatible API support?

An OpenAI-compatible API typically reuses some OpenAI SDK request and response formats. It does not share official OpenAI accounts or guarantee support for every model, parameter, streaming event or tool call. When migrating, check the Base URL, provider-specific key, model ID and endpoint together.

Python's base_url and Node.js's baseURL are client options. Neither converts Chat Completions into Responses, Anthropic Messages or the native Gemini protocol. Choose the endpoint for your task below, then use the linked tutorial's minimal example.

Client or taskFinal request pathChecks and tutorial
Basic chat with the OpenAI SDK/v1/chat/completionscurl, Python and Node.js examples
Test a short text request first, then check SSE, tools and usage separately.
Codex custom provider/v1/responsesconfig.toml and Responses configuration
A successful Chat Completions request is not a verified Codex tool workflow.
Native Claude Code integration/v1/messagesAnthropic Base URL and authentication
Check Messages, streaming and tool-result submission.
Gemini setup/v1/chat/completions
/v1beta/models/{model}:generateContent
Gemini models, keys and protocol selection
Compatible mode uses messages; native mode uses contents / parts. Link's native authentication still needs separate verification.

This table helps select a protocol; it is not a test report claiming that every model works with every endpoint. A catalog listing, successful basic chat and a completed client workflow are different levels of evidence. Verify each with your current account and a spending-limited key.

API TROUBLESHOOTING

Find a fix by API error or symptom

Keep the first failure's status and redacted response. Identify the failing stage before retrying or changing plans.

  1. 01

    Duplicated /v1/v1 or an HTML response
    Check the assembled path with the key-free URL checker. HTTP 200 from a web page is not an API success.

  2. 02

    401 / invalid_api_key
    Check the key's provider, authentication header and environment of the running process. Never publish the key.

  3. 03

    404 / model not found
    Check the model ID, key group and endpoint. Adding funds cannot fix a misspelled model name or request path.

  4. 04

    429 / rate limit / quota
    Separate concurrency limits from insufficient quota, keep Retry-After and avoid unlimited immediate retries.

  5. 05

    502 or a disconnected stream
    Compare a short request with SSE completion events. Partial text does not prove the task finished.

  6. 06

    Chat succeeds but Claude Code fails
    Verify Messages, streaming and tool results separately. A successful Chat Completions request does not validate them.

GUIDED PATH

Find the guide for your issue

View all tutorials
01 · Quick startOpenAI-Compatible API tutorial: integration and request verification

Configure the Base URL with curl, Python and Node.js, verify the model list and first request, and troubleshoot 401, model not found and /v1/v1 errors.

View steps
02 · Quick startGemini API setup: model IDs, Base URL and protocols

Set up Gemini APIs on AIFast Link with an offline model-ID checker and request template. Verify Base URL, protocols, group access and billing before calling.

View steps
03 · Platform ReferenceAIFast Link GPT, Claude and Gemini API Test Template: Capability and Cost Review

Compare current AIFast Link GPT, Claude and Gemini models using the same tasks. Record model access, protocols, latency, tokens and billing plans, then choose based on completed tasks.

View steps
04 · Models and costsLLM API Cost Guide: Choosing Top-Ups or a Monthly Subscription

Estimate AIFast Link GPT, Claude and Gemini API costs by tracking top-ups, monthly subscriptions, live prices, quotas and actual tokens separately. Do not mix billing data or outdated prices from other sites.

View steps
05 · Error troubleshootingClaude Code API Troubleshooting: Protocol Checks Before AIFast Link

Before using Claude Code with AIFast Link, verify that its required protocol is available. Check the Base URL, authentication, streaming, tool calls and common 401, 403, 429 and 502 errors; a model name does not prove compatibility.

View steps
06 · Tool accessClaude Code API setup: custom Base URL and Anthropic Messages

Configure ANTHROPIC_BASE_URL, authentication variables, and model mapping to distinguish Anthropic Messages from the OpenAI Compatible protocol.

View steps
07 · Error troubleshootingOpenAI Compatible Base URL Online Checker

Check OpenAI-compatible API URLs, repeated /v1, complete endpoints, HTTPS, and final request paths to locate /v1/v1 and 404 errors.

View steps
COMMON QUESTIONS

FAQ

Find answers to common setup, verification and troubleshooting questions.

Can every AIFast Link GPT, Claude or Gemini model be used directly with Claude Code?

Do not judge by model name alone. Native Claude Code integration needs the Anthropic Messages protocol. Check the current Link account docs and live endpoints; if only an OpenAI-compatible API is available, do not claim native Claude Code compatibility.

What API Base URL should I use for AIFast Link?

OpenAI-compatible clients use https://www.aifast.link/v1. Set Claude Code's ANTHROPIC_BASE_URL to https://www.aifast.link for requests to /v1/messages. Native Gemini generateContent uses /v1beta/models/{model}:generateContent. Follow the selected model's declared protocol: avoid duplicated /v1 prefixes and do not enter native paths in compatible clients.

How should I compare top-ups and monthly subscriptions?

Link's GPT/Claude monthly plans last 30 days, reset allowances daily and cover only specified groups, excluding Gemini. Compare actual pay-as-you-go costs with the plan fee plus wallet charges for the same work. Record active days, daily overages and wallet fallback settings. Confirm renewal, cancellation and refund terms before purchase.

VERIFIED SOURCES

Reference and Check Sources

Page updated: October 24, 2026
Confirm the model and protocol first, then create a test key

Use the console's live catalog as the source of truth for model IDs, prices, and availability.