Skip to main content
qlaud exposes a full OpenAI Chat Completions surface at https://api.qlaud.ai/v1. Every OpenAI-compatible client works by changing two settings.

Python

from openai import OpenAI

client = OpenAI(
    base_url="https://api.qlaud.ai/v1",
    api_key="qlk_live_...",
)

resp = client.chat.completions.create(
    model="claude-sonnet-4-6",   # or gpt-5.4, deepseek-chat, gemini-3-pro-preview, ...
    messages=[{"role": "user", "content": "hello"}],
)
print(resp.choices[0].message.content)

Node

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.qlaud.ai/v1',
  apiKey: 'qlk_live_...',
});

const resp = await client.chat.completions.create({
  model: 'gpt-5.4',
  messages: [{ role: 'user', content: 'hello' }],
});
console.log(resp.choices[0].message.content);

Vercel AI SDK

import { createOpenAI } from '@ai-sdk/openai';
import { generateText } from 'ai';

const qlaud = createOpenAI({
  baseURL: 'https://api.qlaud.ai/v1',
  apiKey: process.env.QLAUD_API_KEY,
});

const { text } = await generateText({
  model: qlaud('claude-sonnet-4-6'),
  prompt: 'hello',
});

LangChain

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="claude-sonnet-4-6",
    base_url="https://api.qlaud.ai/v1",
    api_key="qlk_live_...",
)

Multi-modal endpoints

The OpenAI SDK’s image, audio, and embeddings methods Just Work too:
# Image generation
img = client.images.generate(
    model="gpt-image-1",
    prompt="a corgi surfing a wave at sunset",
    size="1024x1024",
)

# TTS — OpenAI native model. For ElevenLabs voices use the
# /elevenlabs/v1/text-to-speech/{voice_id} native passthrough instead.
resp = client.audio.speech.create(
    model="gpt-4o-mini-tts",
    voice="alloy",
    input="qlaud ships frontier models behind one URL",
)
resp.stream_to_file("voice.mp3")

# Transcription
with open("voice.mp3", "rb") as f:
    transcript = client.audio.transcriptions.create(
        model="whisper-1",
        file=f,
    )

# Embeddings
emb = client.embeddings.create(
    model="text-embedding-3-large",
    input="hello world",
)
All charged through the same key. All show up in GET /v1/usage under that key’s name.

Streaming

Streaming works exactly like OpenAI’s API:
stream = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "write a haiku about prompt cache"}],
    stream=True,
)
for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)