Quickstart
import { Tabs, TabItem, Steps } from ‘@astrojs/starlight/components’;
-
Get an API key. Request one from the website or grab a free trial key. Keys look like
sk-.... -
Point your OpenAI client at the gateway. Only the base URL and key change.
from openai import OpenAIclient = 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-promessages=[{"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"}]}' -
Switch models freely. Change the
modelfield to any model from the catalogue — the SDK and endpoint stay the same.
Streaming
Section titled “Streaming”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="")