---
title: "Use the OpenAI SDKs with apiToken.sale"
description: "Call GPT and Gemini models from the official OpenAI Python and TypeScript SDKs by changing the base URL and providing your API key."
url: "https://apitoken.sale/int-sdk"
language: "en"
---
# Use the OpenAI SDKs with apiToken.sale

Call GPT and Gemini models from the official OpenAI Python and TypeScript SDKs by changing the base URL and providing your API key.

## Steps

1. Create a key at https://apitoken.sale/register — it looks like `sk-pool-…` and works across every GPT and Gemini model.
2. Point the OpenAI SDKs at the OpenAI-compatible surface: base URL `https://router.apitoken.sale/v1`, key sent as `Authorization: Bearer`.
3. Pick a model by namespaced ID (e.g. `openai/gpt-6.1-terra` or `google/gemini-3.8-flash`) and start — billing is per token at your discount, `GET /v1/models` lists the enabled set.

## Configuration

```
from openai import OpenAI
client = OpenAI(base_url="https://router.apitoken.sale/v1", api_key="sk-pool-…")
response = client.chat.completions.create(
    model="openai/gpt-6.1-terra",  # or "google/gemini-3.8-flash"
    messages=[{"role": "user", "content": "Hello"}],
)
```

---
API reference: https://apitoken.sale/md/docs · All integrations: https://apitoken.sale/md/int
