Quickstart

First call in 5 minutes.

This quickstart gets you from zero to a working API call: create a key, run Python or Node examples, stream responses, and pick the right model.

1. Get an API key

Sign up, open the dashboard, and create a key from the API Keys page. Keys start with sk-live-. Your first $5 trial covers a full day of testing every model.

2. Python (OpenAI SDK)

pip install openai

from openai import OpenAI
client = OpenAI(
    base_url="https://api.plugsky.com/v1",
    api_key="sk-live-...",          # your key
)
resp = client.chat.completions.create(
    model="plugsky-pro",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)

3. Node.js (OpenAI SDK)

import OpenAI from "openai";
const client = new OpenAI({
  baseURL: "https://api.plugsky.com/v1",
  apiKey: "sk-live-...",
});
const resp = await client.chat.completions.create({
  model: "plugsky-lite",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);

4. cURL

curl https://api.plugsky.com/v1/chat/completions \
  -H "Authorization: Bearer sk-live-..." \
  -H "Content-Type: application/json" \
  -d '{"model":"plugsky-pro","messages":[{"role":"user","content":"Hello!"}]}'

5. Streaming

resp = client.chat.completions.create(
    model="plugsky-pro",
    messages=[{"role": "user", "content": "Count to 5"}],
    stream=True,
)
for chunk in resp:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

6. Pick a model

Quickstart FAQ

Do I have to rewrite my code?

No. If you use the OpenAI SDK, only the base_url (and model names) change. See the switch guide.

What are the rate limits?

Limits depend on your plan and are visible in the dashboard.

Where can I test without code?

The playground and playground beta work without a key.

Get started in minutes

OpenAI-compatible API with 30+ models, free trial, and a 99.9% uptime SLA. No code changes required.

Start free trial → Read the docs