Migrate an existing integration
Move an OpenAI-compatible Chat Completions integration to BulkToken.
Update the URL, key, and model
Set the SDK base URL to https://bulktoken.ai/v1, use a BulkToken API key, and choose an exact BulkToken model ID. These are three separate settings.
This guide covers client.chat.completions.create. It does not imply support for every API offered by another provider, including Assistants, file storage, batches, or a provider-specific video workflow.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://bulktoken.ai/v1",
api_key=os.environ["BULKTOKEN_API_KEY"],
)
response = client.chat.completions.create(
model="glm-5.3",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)Check the protocol your framework uses
Select the framework’s Chat Completions integration explicitly when it offers several OpenAI-compatible protocols. A configurable base URL alone does not guarantee that a client uses /chat/completions.
Map provider-specific model aliases to BulkToken model IDs. Remove provider routing options that BulkToken does not document, and start with a minimal request before adding optional parameters.
Verify your application workflow
Before switching application traffic, check:
- A normal answer with the selected model.
- Streaming, empty chunks, and interrupted output.
- Tool calls and the matching result messages, if used.
- Your JSON format or schema, if used.
- Context and output budgets.
- Authentication failures, insufficient credits, rate limits, and usage records.
Keep the old integration available while you validate your actual workload.