Skip to content

Quickstart

import { Tabs, TabItem, Steps } from ‘@astrojs/starlight/components’;

  1. Get an API key. Request one from the website or grab a free trial key. Keys look like sk-....

  2. Point your OpenAI client at the gateway. Only the base URL and key change.

    from openai import OpenAI
    client = OpenAI(
    base_url="https://aiapiv2.pekpik.com/v1",
    api_key="sk-...",
    )
    resp = client.chat.completions.create(
    model="claude-opus-4-7", # or gpt-5.4, deepseek-v3.2, gemini-2.5-pro
    messages=[{"role": "user", "content": "Hello"}],
    )
    print(resp.choices[0].message.content)
    import OpenAI from "openai";
    const client = new OpenAI({
    baseURL: "https://aiapiv2.pekpik.com/v1",
    apiKey: process.env.PEKPIK_KEY,
    });
    const resp = await client.chat.completions.create({
    model: "claude-opus-4-7",
    messages: [{ role: "user", content: "Hello" }],
    });
    console.log(resp.choices[0].message.content);
    Terminal window
    curl https://aiapiv2.pekpik.com/v1/chat/completions \
    -H "Authorization: Bearer $PEKPIK_KEY" \
    -H "Content-Type: application/json" \
    -d '{"model":"claude-opus-4-7","messages":[{"role":"user","content":"Hello"}]}'
  3. Switch models freely. Change the model field to any model from the catalogue — the SDK and endpoint stay the same.

Set stream: true exactly like the OpenAI API:

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