SDKs & Tools
Which client SDKs and tools work with the gateway — what is tested vs what should work.
The gateway is an OpenAI-compatible endpoint plus a native Anthropic surface, so any client that speaks either dialect points at it by changing two lines: the base URL and the API key.
Verified
These are exercised by TokenFactory's own regression suites and documented end-to-end in these docs — treat them as supported:
| Client | Surface | Notes |
|---|---|---|
OpenAI Python SDK (pip install openai) | /v1/* | The canonical example throughout these docs. base_url="https://api.<domain>/v1". |
OpenAI Node SDK (npm install openai) | /v1/* | baseURL: 'https://api.<domain>/v1'. |
Anthropic Python SDK (pip install anthropic) | /v1/messages | base_url="https://api.<domain>" — no /v1; the SDK appends the path. |
| curl / plain HTTP | both dialects | Every endpoint page shows a curl sample; nothing SDK-specific is required. |
The wire shapes themselves are contract-tested per modality (chat, embeddings, images, audio, rerank, anthropic, video) — an SDK that emits the standard OpenAI or Anthropic wire format hits the same tested path.
Should work — same dialect, not individually verified
Any client that emits the standard OpenAI (or Anthropic) wire format should work by setting the base URL and key. This includes tools frequently used with OpenAI-compatible endpoints:
- LangChain (
ChatOpenAIwithbase_url) - Vercel AI SDK (OpenAI provider with
baseURL) - Editor/agent clients (e.g. Cursor) that accept a custom OpenAI base URL
- Claude Code and Anthropic SDK clients via
/v1/messages(Auth)
These are not part of a tested support matrix — the gateway does not run per-tool certification. If a tool strictly follows the OpenAI or Anthropic schemas, it works; if it depends on provider-specific extensions outside those schemas (which the gateway strips or rejects — see Errors), that specific extension may not be available.
Endpoint coverage inside the OpenAI SDKs
Use the OpenAI SDK's typed methods for chat completions, text completions, embeddings, audio and model listing. Pick a model that supports the requested operation from the live catalogue.
Reranking uses the SDK's generic request method or plain HTTP when a rerank model is available to your key. See Rerank.
OpenAI and Anthropic describe compatible API formats; these SDKs call the platform's hosted models using your configured base URL.