Switch your OpenAI SDK to Tapix AI in 5 minutes
Tapix AI speaks the OpenAI API. You do not rewrite your app — you change the base URL and the key. Same SDK, same request shape, same streaming behaviour.
1. Get a key
Sign up, enter the 6-digit code we email you, and copy the key (sk-fg-…). Your first top-up gets 10% extra credit.
2. Python (openai SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://tapixai.com/v1", # the only real change
api_key="sk-fg-...",
)
print(client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[{"role": "user", "content": "Explain SSE in one sentence."}],
).choices[0].message.content)
3. Node / TypeScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://tapixai.com/v1",
apiKey: process.env.TAPIX_API_KEY,
});
const r = await client.chat.completions.create({
model: "gpt-6.1-sol",
messages: [{ role: "user", content: "Ping" }],
});
console.log(r.choices[0].message.content);
4. cURL
curl https://tapixai.com/v1/chat/completions \
-H "Authorization: Bearer $TAPIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4.1-flash","messages":[{"role":"user","content":"Ping"}],"max_tokens":16}'
5. LangChain / LlamaIndex / other frameworks
Anything that accepts an openai_api_base / baseURL / api_base option works unchanged. Keep the model name as it appears in GET /v1/models.
Migration checklist
- Model names differ from OpenAI's: always read GET /v1/models instead of hard-coding guesses.
- Streaming, tool calling and reasoning_content in deltas are supported; long-running requests time out at 300s.
- Errors: 401 = bad or disabled key, 402 = empty balance, 400 content_policy_violation = prompt blocked before billing.
- Billing is prepaid per token, no monthly fee. Set a low-balance reminder in the console and you will get an email before calls start failing.