Should base_url include /v1?
Should base_url include /v1?
Depends on the protocol:
- OpenAI protocol: include
/v1—https://www.fortapi.com/v1. - Anthropic SDK:
ANTHROPIC_BASE_URLdoes not include/v1—https://www.fortapi.com. The SDK appends/v1/messagesitself; adding/v1causes a 404.
Getting 401 / auth failed?
Getting 401 / auth failed?
- You must use a FortAPI token (
sk-...), not an OpenAI / Anthropic key. - Check for stray whitespace or line breaks.
- In the console under Tokens, confirm the key isn’t disabled or expired.
- See Errors.
Getting 404 / model not found?
Getting 404 / model not found?
- The model name is misspelled or isn’t on the main site’s Pricing page. Verify and re-enter it.
- It can also be a wrong base_url (see the
/v1question above).
Getting 403 / insufficient balance?
Getting 403 / insufficient balance?
Your account balance is used up (it’s 403, not 402). Check the balance on the console home page and top up to resume. It can also mean the token is disabled or the group has no access to that model. See Billing & quota.
How do I switch models / providers?
How do I switch models / providers?
Just change the
model field in your request. The same key can call OpenAI / Claude / Gemini / Grok and more — FortAPI converts the protocol automatically. Available model names are on the main site’s Pricing page.Lost my API key — can I see it again?
Lost my API key — can I see it again?
Yes. Go back to the Tokens page in the console and click the eye icon on that token to reveal it, or use “Copy key” to copy the full key.
Streaming produces no output / hangs?
Streaming produces no output / hangs?
- Make sure you pass
stream: trueand consume it with your SDK’s streaming iterator (see the streaming example in the API Reference). - If parsing raw SSE, note each line starts with
data:and ends withdata: [DONE]. - Response buffering in a client/proxy can make streaming look “stuck” — disable buffering.
Frequent 429s?
Frequent 429s?
You’re being rate limited. Retry with exponential backoff rather than hammering. See Rate limits.
OpenAI vs Claude protocol — which should I use?
OpenAI vs Claude protocol — which should I use?
Both are supported and work with the same key. Use the OpenAI protocol for existing OpenAI / LangChain code; use the Claude protocol when you need Claude-native features like thinking blocks. See the comparison table in the API Reference.
request id from the error helps us locate it faster.