Your First API Call

The Clore API uses an API format compatible with OpenAI/Anthropic. By modifying the configuration, you can use the OpenAI/Anthropic SDK or softwares compatible with the OpenAI/Anthropic API to access the Clore API.

PARAM VALUE
base_url (OpenAI) https://api.clore.com
base_url (Anthropic) https://api.clore.com/anthropic
api_key apply for an API key
model* clore-v4-flash
clore-v4-pro
clore-chat (to be deprecated on 2026/07/24)
clore-reasoner (to be deprecated on 2026/07/24)

* The model names clore-chat and clore-reasoner will be deprecated on 2026/07/24 15:59 UTC. For compatibility, they correspond to the non-thinking mode and thinking mode of clore-v4-flash, respectively.

Integrate with Agent Tools #

The Clore API is supported by many popular AI agent and coding assistant tools. If you use tools like Claude Code, GitHub Copilot, or OpenCode, you can use Clore as the backend model directly — no code required.

See the Agent Integrations Guide for details.

Invoke The Chat API #

Once you have obtained an API key, you can access the Clore model using the following example scripts in the OpenAI API format. This is a non-stream example, you can set the stream parameter to "true" to get stream response.

For examples using the Anthropic API format, please refer to Anthropic API.

curl
curl https://api.clore.com/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${CLORE_API_KEY}" \
  -d '{
        "model": "clore-v4-pro",
        "messages": [
          {"role": "system", "content": "You are a helpful assistant."},
          {"role": "user", "content": "Hello!"}
        ],
        "thinking": {"type": "enabled"},
        "reasoning_effort": "high",
        "stream": false
      }'
python
# Please install OpenAI SDK first: `pip3 install openai`
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get('CLORE_API_KEY'),
    base_url="https://api.clore.com",
)

response = client.chat.completions.create(
    model="clore-v4-pro",
    messages=[
        {"role": "system", "content": "You are a helpful assistant"},
        {"role": "user", "content": "Hello"},
    ],
    stream=False,
    reasoning_effort="high",
    extra_body={"thinking": {"type": "enabled"}},
)

print(response.choices[0].message.content)
nodejs
// Please install OpenAI SDK first: `npm install openai`
import OpenAI from "openai";

const openai = new OpenAI({
    baseURL: 'https://api.clore.com',
    apiKey: process.env.CLORE_API_KEY,
});

async function main() {
  const completion = await openai.chat.completions.create({
    messages: [{ role: "system", content: "You are a helpful assistant." }],
    model: "clore-v4-pro",
    thinking: {"type": "enabled"},
    reasoning_effort: "high",
    stream: false,
  });
  console.log(completion.choices[0].message.content);
}
main();