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.

Endpoints

EndpointMethodDescription
/v1/chat/completionsPOSTChat, streaming, tool calling, vision input
/v1/embeddingsPOSTText embeddings
/v1/audio/transcriptionsPOSTSpeech-to-text transcription
/v1/modelsGETList available models

Before you start

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

evroc think apikey create my-app-key

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

export EVROC_API_KEY="<your-key>"

To see available shared models:

evroc think sharedmodel list

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

Chat completions

Completions cURL Request

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.2",
    "messages": [
      {"role": "system", "content": "You are a concise assistant."},
      {"role": "user", "content": "Explain sovereign AI in one sentence."}
    ]
  }'

OpenAI Python client

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.2",
)

print(chat_completion.choices[0].message.content)

Streaming

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.2",
    stream=True,
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
print()

LangChain

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.2",                         # 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.

Tool calling

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.2",
    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"]
            }
        }
    }]
)

Supported parameters

The /v1/chat/completions endpoint supports:

  • model — model identifier (e.g. zai-org/GLM-5.2)
  • 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)

Embeddings

Embeddings cURL Request

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."
  }'

OpenAI Python client - Embeddings

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])

Audio transcription

Audio cURL request

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"

List models

cURL Request - List Models

curl https://models.think.evroc.com/v1/models \
  -H "Authorization: Bearer $EVROC_API_KEY"

What doesn't change when you switch

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 parsersStrOutputParser, JsonOutputParser, PydanticOutputParser
  • Message historyRunnableWithMessageHistory, ChatMessageHistory
  • Tool callingbind_tools(), tool schemas, execution loops
  • Streamingstream() and astream() return chunks via SSE
  • Structured outputresponse_format and manual JSON prompting both work
  • EmbeddingsOpenAIEmbeddings with base_url pointed at evroc Think Models

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

See Also

  • Concepts — Shared Models vs Dedicated Model Instances
  • Supported models — Available models, model cards, and pricing
  • CLI — Manage model instances and API keys
  • Inference API — Full OpenAPI specification