Guide

How to get started with PositionAPI

Five steps from purchase to the first model response. Each step says what to do, where it is in the console, and the most common mistake.

I.

Sign in to the console

The seller sends your username and password in your FunPay order chat. No separate sign-up is needed.

  1. Open the sign-in page and enter the login and password from your order.
  2. After signing in you will see the Overview: balance, subscription limits and spending.
Sign in
Didn't get your sign-in details? Write in your FunPay order chat; support answers only there.

II.

Create an API key

A key is a password for your apps. One key works with every model in the catalog.

  1. Open API keys and click “Create API key”.
  2. Give the key a clear name, for example “Codex on laptop”.
  3. You can leave the other fields empty: click “Create key” and copy it. The key starts with sk-.
Allowed models
Leave empty to allow all models, including ones added later. If you set a list, new models won’t be added automatically — the console will show a notice.
Quota
How many dollars the key may spend. Empty — no limit.
IP allowlist
Requests are accepted only from these addresses. Empty — from anywhere.
Expiry
After how many days the key disables itself. Empty — never.
Common mistake. A key copied with a space or only partly gives a 401 error. Use the copy button next to the key.

III.

Activate your subscription or balance with your order code

Requests are paid from your balance or by subscription. Both are activated with the code from your FunPay order.

  1. Open Wallet and paste the code from your order into the activation field.
  2. The balance or plan is credited immediately; you can see it on the Overview.

How subscription limits work

A subscription is spent in two windows at once. A request goes through while both have room left.

5 hours

A short window against bursts. Usage leaves it 5 hours after each request, so the allowance refills gradually.

7 days

The weekly share of the plan. Usage leaves it 7 days after each request.

Remaining limits are shown in the console: the Limit indicator in the top bar, with details on the Overview and in the Wallet. When a window is closed, requests get a 429 error saying when it reopens.

Need to keep working right now? Top up your balance: while a subscription window is closed, requests are charged to it.

IV.

Connect an app

Every app needs two things: the base URL and your key. Codex and Claude Code have one-click installers; other apps have step-by-step instructions.

Automatic setup · 1 click · GPT-6 Astra

Codex Desktop / CLI: set up in 10 seconds

The Windows auto-setup connects the GPT-6 Astra flagship through PositionAPI. No VPN, no foreign cards and no 401 error from OpenAI's servers.

  1. 1Download the fileClick “Quick download (.bat)” above and save the file.
  2. 2Run and enter your keyRun the downloaded file and paste your key sk-... and press Enter.
  3. 3Open CodexOpen Codex Desktop: GPT-6 Astra is already connected and ready to work!
Fixing the 401 error on api.openai.com. If Codex shows “Incorrect API key provided ... url: https://api.openai.com/v1/responses”, Codex is calling OpenAI's servers instead of our API. Run the .bat file and it will instantly set the provider model_provider = 'positionapi' in your personal %USERPROFILE%\.codex\config.toml.

Other apps

Use your PositionAPI key in any client with a configurable API endpoint. Choose an application:

IDEs and code

Codex Desktop / CLI

One click

Automatic and manual setup of OpenAI Codex (Desktop and CLI) through PositionAPI with GPT-6 Astra, without a VPN.

Download Codex Desktop setup (.bat)
Base URL
https://positionapi.top/v1
Do not add /responses: Codex adds the path automatically
Provider (model_provider)
positionapi
Environment variable for your API key
POSITION_API_KEY
Value: your key from API keys
Example model
gpt-6-astra
  1. Create a key in Dashboard → API keys. Subscription and limits apply to the key owner's account.
  2. Windows: Win + R → SystemPropertiesAdvanced → Environment Variables → user variables → New. Name: POSITION_API_KEY. Value: your complete key, without quotes, spaces or Bearer.
  3. Fully close Codex. Win + R → %USERPROFILE%\.codex. Back up config.toml, then open the original in Notepad. This is your personal user folder, not the project folder.
  4. At the start of config.toml, before the first bracketed section, set model, model_provider and web_search as shown. Replace existing lines instead of duplicating them. Add [model_providers.positionapi] at the end, or update it if it exists.
  5. Save config.toml (not config.toml.txt) and restart Windows so the app receives the new variable. On macOS/Linux, use ~/.codex/config.toml and set POSITION_API_KEY in the environment used to launch Codex.
  6. Open a new local Codex task or run codex in the terminal. Ask it to reply with one word: working. Check the request in Dashboard → Logs.
Personal config.toml: do not paste your key into this block
model = "gpt-6-astra"
model_provider = "positionapi"
web_search = "disabled"

[model_providers.positionapi]
name = "PositionAPI"
base_url = "https://positionapi.top/v1"
env_key = "POSITION_API_KEY"
wire_api = "responses"
requires_openai_auth = false
supports_websockets = false
A 401 from api.openai.com means Codex is still using the OpenAI provider. Check model_provider and create a new task. A PositionAPI key cannot be used to sign in to OpenAI.
Missing POSITION_API_KEY: check the variable and restart Windows. 401 from positionapi.top: check your key. 429: request or subscription limit; 502–504: model channel unavailable.
Support depends on the model and channel: HTTP Responses, text, streaming and local Codex tools. Built-in OpenAI search, WebSocket, background tasks and server-side Response storage are unsupported. This file does not configure ChatGPT cloud tasks.
Subscriptions are subject to limits. Once exhausted, requests may be charged to your balance if sufficient funds are available.
Official Codex documentation: custom providers ↗

V.

Send your first request

Check that everything works: ask the model something in your app, or run the command below with your key.

cURL
curl https://positionapi.top/v1/chat/completions \
  -H "Authorization: Bearer sk-ваш-ключ" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-5", "messages": [{"role": "user", "content": "Привет!"}]}'

Got a reply? The request will appear in the Usage log with the model, token count and cost. No reply? Look up the error code in the next section.

No apps needed. The console has a playground: pick a model and chat right in your browser.

?

If something doesn’t work

Find the error code — your app shows it, and it’s also in the Usage log.

401

Key missing or invalid

Why: The key was copied partially or with a space, or the app sends requests to a different address — for example, Codex calling api.openai.com.

What to do: Make sure the base URL ends with /v1 and the key starts with sk-. For Codex, run the .bat installer.

Codex installer
402

Insufficient funds

Why: Your balance doesn’t cover the request and there is no subscription.

What to do: Redeem the code from your FunPay order in the Wallet.

Open wallet
403

Model not allowed for the key, or the key is unavailable

Why: The key’s model list doesn’t include this model, or the key is disabled, expired, out of quota, or the request came from a non-allowed IP.

What to do: In API keys, add the model to the list or clear it to allow all models. Check the expiry, quota and IP list.

Open keys
404

Model not found

Why: The model name differs from the catalog.

What to do: Copy the exact name from the catalog: case and hyphens matter (claude-opus-5-5, not Claude Opus 5.5).

Model catalog
429

Subscription limit reached

Why: One of the subscription windows is closed: 5 hours or 7 days. The error message says which one and when it reopens.

What to do: Wait for the stated time or top up your balance — requests will be charged to it. Remaining limits are shown in the console.

How limits work
502 / 503

Channel unavailable

Why: The model provider didn’t respond or is temporarily disabled.

What to do: Retry in a minute or pick another model. Model latency and uptime are shown in the rankings.

Rankings
Still stuck? Message your FunPay order chat with the request time, model and error text from the Usage log. With these details we can help faster.

For developers

API reference

PositionAPI is compatible with the OpenAI (Chat Completions, Responses) and Anthropic (Messages) formats. Feature availability depends on the model and channel.

Authentication

Send the key in the header Authorization: Bearer sk-…. Each key belongs to your account with an active subscription or balance.

headers
Authorization: Bearer sk-ваш-ключ
Content-Type: application/json

Chat Completions POST /v1/chat/completions

cURL
curl https://positionapi.top/v1/chat/completions \
  -H "Authorization: Bearer $POSITION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-5",
    "messages": [
      {"role": "system", "content": "Ты — полезный ассистент."},
      {"role": "user", "content": "Привет!"}
    ],
    "temperature": 0.7
  }'

Responses follow the OpenAI format. The header x-position-cost returns the actual request cost in USD.

Responses API for Codex POST /v1/responses

Text, HTTP streaming and client tools (function and custom) are supported. Pass the history in input and store: false. Response storage, previous_response_id, conversation, background and WebSocket are not available. OpenAI built-in tools are disabled. The selected model's channel must support Responses.

Request body JSON
{
  "model": "gpt-5.6-sol",
  "input": "Ответь одним словом: работает",
  "stream": true,
  "store": false,
  "max_output_tokens": 256
}

A regular response contains output and usage. In a stream, completion is marked by response.completed or response.incomplete, an error by response.failed. The request appears in the log as /v1/responses. Key limits, subscription and balance are checked the same way as for Chat Completions.

OpenAI SDK

TypeScript
import OpenAI from "openai";
const client = new OpenAI({
  baseURL: "https://positionapi.top/v1",
  apiKey: process.env.POSITION_API_KEY,
});
const response = await client.chat.completions.create({
  model: "claude-sonnet-5",
  messages: [{ role: "user", content: "Hello!" }],
});

Streaming

Add "stream": true to receive SSE. We automatically request stream_options.include_usageto ensure accurate billing.

TypeScript
const stream = await client.chat.completions.create({
  model: "claude-sonnet-5",
  messages: [{ role: "user", content: "Напиши хайку про API" }],
  stream: true,
});
for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Model list GET /v1/models

cURL
curl https://positionapi.top/v1/models \
  -H "Authorization: Bearer $POSITION_API_KEY"

Only models allowed by your key are returned. The complete catalog with prices is in the model catalog.

Billing

cost = (input × input_price + output × output_price + cache × cache_price) / 1,000,000 × group_multiplier
  • Catalog prices are per 1M tokens in USD.
  • Cached input tokens are billed at a separate, lower rate.
  • Models marked “Per request” charge a fixed amount per call.
  • The group multiplier is set by the administrator and shown in the key settings.
  • The usage log shows the provider's official rate next to our price, so you can see how much you saved.
Guide · PositionAPI