Switching from OpenAI or Anthropic
From OpenAI
Change the base URL, the key and the model name. Nothing else.
python
from openai import OpenAI
# Before
client = OpenAI(api_key="sk-...")
# After
client = OpenAI(base_url="https://api.continuumlabs.ai/v1", api_key="cl-your-key")
reply = client.chat.completions.create(model="glm-5.2", messages=[{"role": "user", "content": "Hello"}])If your code reads the OPENAI_BASE_URL and OPENAI_API_KEY environment variables, you can switch without changing code at all.
bash
export OPENAI_BASE_URL=https://api.continuumlabs.ai/v1
export OPENAI_API_KEY=cl-your-keyWhat is different
- Model names. Use one of our models. OpenAI model names such as
gpt-4oare not available. - Endpoints. We support chat completions, embeddings and listing models. The Responses API, Assistants, images and audio endpoints are not available yet.
- Parameters. Common parameters work:
temperature,max_tokens,top_p,stop,tools,tool_choice,response_formatandstream. Support for less common ones depends on the model.
From Anthropic
Anthropic's API uses a different request format. Switch to the OpenAI SDK, which takes a few lines to change.
| Anthropic | Continuum |
|---|---|
client.messages.create(...) | client.chat.completions.create(...) |
system="..." as its own field | A message with "role": "system" first in messages |
max_tokens (required) | max_tokens (optional) |
response.content[0].text | response.choices[0].message.content |
tools with input_schema | tools with "type": "function" and parameters |
stop_reason | choices[0].finish_reason |
python
# Before, with Anthropic
message = anthropic.messages.create(
model="claude-...", max_tokens=1024, system="You are concise.",
messages=[{"role": "user", "content": "Hello"}],
)
text = message.content[0].text
# After, with Continuum
reply = client.chat.completions.create(
model="glm-5.2",
messages=[{"role": "system", "content": "You are concise."}, {"role": "user", "content": "Hello"}],
)
text = reply.choices[0].message.contentChoosing a model
Open models differ in what they are best at. Try your own prompts in the playground before you switch, and see the scorecard for how each model does on real Australian tasks.
