Integrations
Any OpenAI-compatible library works. Point it at the CLōD base URL.
LangChain
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
base_url="https://api.clod.io/v1",
api_key="YOUR_API_KEY",
model="MODEL_NAME",
)
print(llm.invoke("Say hello.").content)LlamaIndex
from llama_index.llms.openai_like import OpenAILike
llm = OpenAILike(
api_base="https://api.clod.io/v1",
api_key="YOUR_API_KEY",
model="MODEL_NAME",
is_chat_model=True,
)
print(llm.complete("Say hello."))Vercel AI SDK
import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";
const clod = createOpenAI({
baseURL: "https://api.clod.io/v1",
apiKey: "YOUR_API_KEY",
});
const { text } = await generateText({
model: clod.chat("MODEL_NAME"),
prompt: "Say hello.",
});