PacketLab

PacketLab API

Connect existing tools to PacketLab in three steps.

Top up, create an API key, then replace Base URL and use modelpass/auto. Model access, point billing, and usage logs live in one console.

1. Use Auto

Smart-routing clients only use modelpass/auto; the platform automatically selects the right capability.

2. Top up and create key

Top up points, create an API key, and store it as a server-side environment variable.

3. Replace Base URL

Keep the existing SDK and replace only baseURL, apiKey, and model.

curl
curl "https://packetlab.app/v1/chat/completions" \
  -H "Authorization: Bearer $PACKETLAB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "modelpass/auto",
    "max_tokens": 800,
    "temperature": 0.7,
    "messages": [
      { "role": "user", "content": "Write a short product brief." }
    ]
  }'
OpenAI SDK
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.PACKETLAB_API_KEY,
  baseURL: "https://packetlab.app/v1",
});

const completion = await client.chat.completions.create({
  model: "modelpass/auto",
  max_tokens: 800,
  temperature: 0.7,
  messages: [{ role: "user", content: "Write a short product brief." }],
});

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

Billing rules

Each model consumes points by public pricing; only completed responses are billed.

Compatible parameters

Supports model, messages, max_tokens, temperature, top_p, stop, response_format, frequency_penalty, presence_penalty, and seed. stream=true is not supported yet.

Technical advantages

One API entry point, one wallet, and one usage ledger make multi-model access easier for products and developer tools.