Guide
Getting started with ModuleAPI
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.
https://moduleapi.pro/v1I.
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 username and password from your order.
- 2. After signing in you’ll see the Overview: balance, subscription limits and usage.
Didn’t get your sign-in details?
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. Other fields are optional — 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
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’ll 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?
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.
Codex Desktop / CLI: setup in 10 seconds
Автоматический настройщик подключит Codex к ModuleAPI. Модель выбирается в Codex, запросы идут через ваш ключ.
Get started in 3 steps:
Click “Download (.bat)” above and save the file.
Run the downloaded file and paste your key sk-... and press Enter.
Откройте Codex Desktop и выберите модель из списка.
model_provider = 'moduleapi' in your personal %USERPROFILE%\.codex\config.toml.Other apps
Use your ModuleAPI key in any client with a configurable API endpoint. Choose an application:
Codex Desktop / CLI
Автоматическая и ручная настройка OpenAI Codex (Desktop и CLI) для работы через ModuleAPI в пределах лимитов ключа.
Download Codex Desktop setup (.bat)Codex Desktop for Windows: one-click setup
Настройщик подключит Codex к ModuleAPI и сохранит ваш ключ. Модель выбирается в Codex, а запросы идут через ваш ключ ModuleAPI.
Get started in 3 steps:
Click “Download (.bat)” above and save the file.
Double-click the file and paste your key sk-... and press Enter.
Откройте Codex Desktop и выберите модель из списка.
Settings to paste into your application:
https://moduleapi.pro/v1Do not add /responses: Codex adds the path automatically
moduleapiMODULE_API_KEYValue: your key from API keys
Manual setup (without BAT):
- 1Create a key in Dashboard → API keys. Subscription and limits apply to the key owner's account.
- 2Windows: Win + R → SystemPropertiesAdvanced → Environment Variables → user variables → New. Name: MODULE_API_KEY. Value: your complete key, without quotes, spaces or Bearer.
- 3Fully 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В начале config.toml, до первого раздела в квадратных скобках, задайте model_provider и web_search как в примере. Имя модели оставьте под выбор Codex. Раздел [model_providers.moduleapi] добавьте в конец или обновите, если он уже есть.
- 5Save 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 MODULE_API_KEY in the environment used to launch Codex.
- 6Open 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_provider = "moduleapi"
web_search = "disabled"
[model_providers.moduleapi]
name = "ModuleAPI"
base_url = "https://moduleapi.pro/v1"
env_key = "MODULE_API_KEY"
wire_api = "responses"
requires_openai_auth = false
supports_websockets = falseA 401 from api.openai.com means Codex is still using the OpenAI provider. Check model_provider and create a new task. A ModuleAPI key cannot be used to sign in to OpenAI.
Missing MODULE_API_KEY: check the variable and restart Windows. 401 from moduleapi.pro: check your key. 429: request or subscription limit; 502–504: model channel unavailable.
Модель выбирается в Codex. Выбранные модели проходят через ключ ModuleAPI; если GPT-модель отсутствует в каталоге сервиса, используется общий резервный движок. Поддерживаются Responses по HTTP, текст, потоковые ответы и локальные инструменты Codex. Встроенный поиск OpenAI, WebSocket, фоновые задачи и хранение Responses на сервере не поддерживаются.
Subscriptions are subject to limits. Once exhausted, requests may be charged to your balance if sufficient funds are available.
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 https://moduleapi.pro/v1/chat/completions \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{"model": "claude-sonnet-5", "messages": [{"role": "user", "content": "Hello!"}]}'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 app needed
?
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 installer402
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 wallet403
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 keys404
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 catalog429
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 work502 / 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.
RankingsStill stuck?
For developers
API reference
ModuleAPI 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.
Authorization: Bearer sk-your-key
Content-Type: application/jsonChat Completions
POST /v1/chat/completionscurl https://moduleapi.pro/v1/chat/completions \
-H "Authorization: Bearer $MODULE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"temperature": 0.7
}'Responses follow the OpenAI format. The header x-moduleapi-cost returns the actual request cost in USD.
Responses API for Codex
POST /v1/responsesSupports text, HTTP streaming and client tools (function and custom). Send history in input with store: false. Response storage, previous_response_id, conversation, background and WebSocket are unavailable. Built-in OpenAI tools are disabled. The model channel must support Responses.
{
"model": "gpt-5.6-sol",
"input": "Reply with one word: working",
"stream": true,
"store": false,
"max_output_tokens": 256
}A regular response contains output and usage. Streams end with response.completed or response.incomplete; errors use response.failed. Requests appear in the log under /v1/responses. Key limits, subscription and balance checks work as for Chat Completions.
OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://moduleapi.pro/v1",
apiKey: process.env.MODULE_API_KEY,
});
const response = await client.chat.completions.create({
model: "claude-sonnet-5",
messages: [{ role: "user", content: "Hello!" }],
});from openai import OpenAI
client = OpenAI(
base_url="https://moduleapi.pro/v1",
api_key=os.environ["MODULE_API_KEY"],
)
response = 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.
const stream = await client.chat.completions.create({
model: "claude-sonnet-5",
messages: [{ role: "user", content: "Write a haiku about APIs" }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}Model list
GET /v1/modelscurl https://moduleapi.pro/v1/models \
-H "Authorization: Bearer $MODULE_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 in USD per 1M tokens.
- • 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 appears in key settings.
- • The usage log shows official provider rates alongside our prices so you can see your savings.