DocsOpenAI SDK

SDK

Connect CLōD to OpenAI SDK

Already using OpenAI SDK? Change two lines. Works with Python, Node.js, and more.

Overview

CLōD is fully OpenAI SDK compatible. If you already use the OpenAI SDK, you only need to change the base URL and API key — no other changes needed.

Prerequisites

  • • CLōD account — free at app.clod.io
  • • OpenAI SDK installed
  • • CLōD API key (Dashboard → API Keys → Generate)

Setup

Step 1: Python

pip install openai

from openai import OpenAI

client = OpenAI(
    api_key="your_clod_api_key",
    base_url="https://api.clod.io/v1"
)

response = client.chat.completions.create(
    model="meta-llama/Meta-Llama-3.3-70B-Instruct",
    messages=[{"role": "user", "content": "Hello!"}]
)

Step 2: Node.js

npm install openai

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "your_clod_api_key",
  baseURL: "https://api.clod.io/v1",
});

const response = await client.chat.completions.create({
  model: "meta-llama/Meta-Llama-3.3-70B-Instruct",
  messages: [{ role: "user", content: "Hello!" }],
});

Available Models

CLōD supports 50+ models. For agentic tools, use models that support tool calling / function calling.

Browse models →

Need help?

Discord · Docs