DEV Community

半年游
半年游

Posted on

Swap two lines: point your OpenAI SDK at KeyoAPI

If your app already talks to OpenAI-compatible APIs, you can try KeyoAPI by changing base URL and API key — same chat completions shape.

What KeyoAPI is
A prepaid AI API relay: one wallet for GPT-class chat, Claude, DeepSeek, Whisper, OCR, vision, TTS, and related models.

Base URL: https://www.keyoapi.xyz/v1

--- Node / OpenAI SDK (copy into your project) ---
import OpenAI from "openai";

const client = new OpenAI({
apiKey: process.env.KEYO_API_KEY,
baseURL: "https://www.keyoapi.xyz/v1",
});

const res = await client.chat.completions.create({
model: "gpt-5.6-luna",
messages: [{ role: "user", content: "Hello from KeyoAPI" }],
});

console.log(res.choices[0].message.content);

--- Python (copy into your project) ---
from openai import OpenAI

client = OpenAI(
api_key="YOUR_KEYO_API_KEY",
base_url="https://www.keyoapi.xyz/v1",
)

r = client.chat.completions.create(
model="gpt-5.6-luna",
messages=[{"role": "user", "content": "Hello from KeyoAPI"}],
)
print(r.choices[0].message.content)

Cursor / ChatBox
Set Base URL to https://www.keyoapi.xyz/v1 and paste your Keyo API key. Pick a model id from the live catalog (do not guess the name).

Free vs paid
Permanent *-free model IDs are for prototyping (fair-use limits). For production traffic, switch to the metered twin without changing the base URL.

Links
Site: https://www.keyoapi.xyz/
Free models: https://www.keyoapi.xyz/free-models
Pricing / try: https://www.keyoapi.xyz/pricing
Docs: https://www.keyoapi.xyz/brand/keyo-docs.html

Questions about a specific client setup? Drop a comment.

Top comments (0)