Skip to content

OpenAI API Compatibility

evroc Think Models exposes an OpenAI-compatible API. If your application already uses the OpenAI client library, LangChain, or any framework that calls /v1/chat/completions, switching to evroc Think is a configuration change — not an engineering project.

The base URL is https://models.think.evroc.com/v1. Authentication uses a Bearer token. Your existing client library works unchanged.

Endpoint Method Description
/v1/chat/completions POST Chat, streaming, tool calling, vision input
/v1/embeddings POST Text embeddings
/v1/audio/transcriptions POST Speech-to-text transcription
/v1/models GET List available models

You need an evroc account and a evroc Think Models API key.

Terminal window
evroc think apikey create my-app-key

The key is shown once. Save it to an environment variable:

Terminal window
export EVROC_API_KEY="<your-key>"

To see available shared models:

Terminal window
evroc think sharedmodel list

Model names follow the provider/model-name convention (e.g. zai-org/GLM-5.3), not a flat string.

Terminal window
curl https://models.think.evroc.com/v1/chat/completions \
-H "Authorization: Bearer $EVROC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "zai-org/GLM-5.3",
"messages": [
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Explain sovereign AI in one sentence."}
]
}'
from openai import OpenAI
client = OpenAI(
base_url="https://models.think.evroc.com/v1",
api_key=os.environ["EVROC_API_KEY"],
)
chat_completion = client.chat.completions.create(
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain sovereign AI in one sentence."},
],
model="zai-org/GLM-5.3",
)
print(chat_completion.choices[0].message.content)

Set stream: true to receive tokens as they’re generated via SSE.

stream = client.chat.completions.create(
messages=[{"role": "user", "content": "Write a haiku about European cloud infrastructure."}],
model="zai-org/GLM-5.3",
stream=True,
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
print()

If you have a LangChain app using ChatOpenAI, these are the only changes:

from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
base_url="https://models.think.evroc.com/v1", # line 1: point to evroc
model="zai-org/GLM-5.3", # line 2: pick a Think Model
api_key=os.environ["EVROC_API_KEY"],
)

Everything else — prompts, chains, output parsers, message history, tool definitions — stays identical.

evroc Think Models supports OpenAI-style tool calling.

response = client.chat.completions.create(
messages=[{"role": "user", "content": "What's the weather in Stockholm?"}],
model="zai-org/GLM-5.3",
tools=[{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string", "description": "City name"}
},
"required": ["location"]
}
}
}]
)

The /v1/chat/completions endpoint supports:

  • model — model identifier (e.g. zai-org/GLM-5.3)
  • messages — array of message objects with role and content
  • stream — enable SSE streaming
  • temperature — sampling temperature
  • max_tokens — maximum output tokens
  • tools — function/tool definitions
  • response_format — structured output (JSON mode)
  • top_p — nucleus sampling
  • seed — deterministic sampling (model-dependent)
Terminal window
curl https://models.think.evroc.com/v1/embeddings \
-H "Authorization: Bearer $EVROC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "intfloat/multilingual-e5-large-instruct",
"input": "Embeddings represent text in a numerical format."
}'
from openai import OpenAI
client = OpenAI(
base_url="https://models.think.evroc.com/v1",
api_key=os.environ["EVROC_API_KEY"],
)
embedding = client.embeddings.create(
model="intfloat/multilingual-e5-large-instruct",
input="Embeddings represent text in a numerical format.",
)
print(embedding.data[0].embedding[:5])
Terminal window
curl https://models.think.evroc.com/v1/audio/transcriptions \
-H "Authorization: Bearer $EVROC_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "model=openai/whisper-large-v3" \
-F "file=@audio.mp3"
Terminal window
curl https://models.think.evroc.com/v1/models \
-H "Authorization: Bearer $EVROC_API_KEY"

When migrating an existing OpenAI-compatible application to evroc Think Models, the following stay identical:

  • Prompts — system prompts, user prompts, template variables
  • Chains — LCEL chains (prompt | llm | parser)
  • Output parsers — StrOutputParser, JsonOutputParser, PydanticOutputParser
  • Message history — RunnableWithMessageHistory, ChatMessageHistory
  • Tool calling — bind_tools(), tool schemas, execution loops
  • Streaming — stream() and astream() return chunks via SSE
  • Structured output — response_format and manual JSON prompting both work
  • Embeddings — OpenAIEmbeddings with base_url pointed at evroc Think Models

The only thing that changes is where the request goes and which model answers it.

  • Concepts — Shared Models vs Dedicated Model Instances
  • Supported models — Available models, model cards, and capabilities
  • Coding agents — Use evroc think code to launch AI coding agents
  • CLI — Manage model instances and API keys
  • Inference API — Full OpenAPI specification