Documentation

Get started in 5 minutes

byteplus.cc is OpenAI-compatible. If your code already talks to OpenAI, point it here and change the model name.

# Install the SDK
npm install openai

# Set your key
export BYTEPLUS_API_KEY="bp_..."

# Call any model — change one string
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://byteplus.cc/v1",
  apiKey: process.env.BYTEPLUS_API_KEY,
});

const res = await client.chat.completions.create({
  model: "dola-seed-2-0-code",
  messages: [{ role: "user", content: "Write a Python function to retry a request." }],
});

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