Skip to main content
Get up and running with the Icelake API in minutes.

1. Get an API key

  1. Sign in at chat.icelake.io
  2. Open Settings → API keys
  3. Create a key and copy it immediately — the full secret is shown once

2. Configure the environment

export ICELAKE_API_KEY='icl_...'

3. Install the OpenAI SDK (optional)

npm install openai
pip install openai
You can also use raw HTTP / cURL.

4. Send a chat completion

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.ICELAKE_API_KEY,
  baseURL: "https://chat.icelake.io/api/v1",
});

const res = await client.chat.completions.create({
  model: "zai-org-glm-5-2",
  messages: [
    { role: "system", content: "You are a helpful assistant." },
    { role: "user", content: "Why is privacy important?" },
  ],
});

console.log(res.choices[0].message.content);
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["ICELAKE_API_KEY"],
    base_url="https://chat.icelake.io/api/v1",
)

res = client.chat.completions.create(
    model="zai-org-glm-5-2",
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Why is privacy important?"},
    ],
)

print(res.choices[0].message.content)
curl https://chat.icelake.io/api/v1/chat/completions \
  -H "Authorization: Bearer $ICELAKE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zai-org-glm-5-2",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Why is privacy important?"}
    ]
  }'

5. List models

Use IDs from GET /models as the model field on chat and image requests.
curl https://chat.icelake.io/api/v1/models \
  -H "Authorization: Bearer $ICELAKE_API_KEY"

6. Optional: streaming

Set stream: true to receive SSE chunks ending with data: [DONE].
const stream = await client.chat.completions.create({
  model: "zai-org-glm-5-2",
  stream: true,
  messages: [{ role: "user", content: "Write a short poem" }],
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Next