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.

base_urlhttps://moduleapi.pro/v1

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. 1. Open the sign-in page and enter the username and password from your order.
  2. 2. After signing in you’ll see the Overview: balance, subscription limits and usage.

Didn’t get your sign-in details?

Message 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. 1. Open API keys and click “Create API key”.
  2. 2. Give the key a clear name, for example “Codex on laptop”.
  3. 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

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. 1. Open Wallet and paste the code from your order into the activation field.
  2. 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?

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.

Автонастройка · 1 клик · ModuleAPI

Codex Desktop / CLI: setup in 10 seconds

Автоматический настройщик подключит Codex к ModuleAPI. Модель выбирается в Codex, запросы идут через ваш ключ.

Get started in 3 steps:

1Download the file

Click “Download (.bat)” above and save the file.

2Run and enter your key

Run the downloaded file and paste your key sk-... and press Enter.

3Open Codex

Откройте Codex Desktop и выберите модель из списка.

Fixing 401 errors from api.openai.com: If Codex shows the error «Incorrect API key provided ... url: https://api.openai.com/v1/responses» means Codex is contacting OpenAI instead of our API. Run the .bat file, and it will configure the provider 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:

IDEs and code

Codex Desktop / CLI

Автоматическая и ручная настройка OpenAI Codex (Desktop и CLI) для работы через ModuleAPI в пределах лимитов ключа.

Download Codex Desktop setup (.bat)
Recommended · Setup in 10 seconds

Codex Desktop for Windows: one-click setup

Настройщик подключит Codex к ModuleAPI и сохранит ваш ключ. Модель выбирается в Codex, а запросы идут через ваш ключ ModuleAPI.

Get started in 3 steps:

1Download the BAT file

Click “Download (.bat)” above and save the file.

2Run and paste your key

Double-click the file and paste your key sk-... and press Enter.

3Open Codex

Откройте Codex Desktop и выберите модель из списка.

Important (401 from api.openai.com): Do not enter your ModuleAPI key on the standard OpenAI browser sign-in screen. The setup above configures a direct connection to ModuleAPI.

Settings to paste into your application:

Base URL
https://moduleapi.pro/v1

Do not add /responses: Codex adds the path automatically

Provider (model_provider)
moduleapi
Environment variable for your API key
MODULE_API_KEY

Value: your key from API keys

Manual setup (without BAT):

  1. 1Create a key in Dashboard → API keys. Subscription and limits apply to the key owner's account.
  2. 2Windows: Win + R → SystemPropertiesAdvanced → Environment Variables → user variables → New. Name: MODULE_API_KEY. Value: your complete key, without quotes, spaces or Bearer.
  3. 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. 4В начале config.toml, до первого раздела в квадратных скобках, задайте model_provider и web_search как в примере. Имя модели оставьте под выбор Codex. Раздел [model_providers.moduleapi] добавьте в конец или обновите, если он уже есть.
  5. 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.
  6. 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:

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 = false
Please note:

A 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.

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://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

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

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.

headers
Authorization: Bearer sk-your-key
Content-Type: application/json

Chat Completions

POST /v1/chat/completions
cURL
curl 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/responses

Supports 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.

Request body JSON
{
  "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

TypeScript
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!" }],
});
Python
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.

TypeScript
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/models
cURL
curl 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.
Setup guide · ModuleAPI