OpenAI-compatible REST API for powerful AI completions. Drop-in replacement — just change the base URL.
All API requests require authentication using a Bearer token. Get your API key from the Dashboard.
Authorization header as Bearer YOUR_API_KEY
Authorization: Bearer fgpt-your-api-key-here
WormGPT charges by the total number of tokens processed — both input (prompt) and output (completion) tokens are counted together. No subscriptions, no hidden fees. Top up anytime via crypto or Telegram Stars.
| Tokens | Cost | Example |
|---|---|---|
| 1,000 | $0.016 | ~750 words |
| 100,000 | $1.60 | ~75,000 words |
| 1,000,000 | $16.00 | ~750,000 words |
WormGPT is fully OpenAI-compatible. Just change the base_url to our endpoint and use your API key from the Dashboard.
# Python — using openai library
from openai import OpenAI
client = OpenAI(
api_key="wgpt-your-api-key",
base_url="https://api.wormgpt.pw/v1"
)
response = client.chat.completions.create(
model="wormgpt-uncensored",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)
Generate text completions from a list of messages. Fully compatible with the OpenAI Chat Completions API.
| Parameter | Type | Required | Description |
|---|---|---|---|
| messages | array | required | Array of message objects with role and content |
| model | string | required | Model ID. Use wormgpt-uncensored |
| stream | boolean | optional | If true, stream partial message deltas via SSE |
| temperature | number | optional | Sampling temperature 0–2. Default: 1.0 |
| max_tokens | integer | optional | Maximum tokens to generate |
{
"model": "wormgpt-uncensored",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Explain quantum computing in simple terms."
}
],
"temperature": 0.7,
"max_tokens": 1000
}
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "wormgpt-uncensored",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Quantum computing uses quantum bits..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 42,
"completion_tokens": 158,
"total_tokens": 200
}
}
Set stream: true to receive partial results via Server-Sent Events as they're generated.
# Python streaming example
stream = client.chat.completions.create(
model="wormgpt-uncensored",
messages=[{"role": "user", "content": "Tell me a story"}],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content is not None:
print(chunk.choices[0].delta.content, end="", flush=True)
| Model ID | Context | Status | Description |
|---|---|---|---|
wormgpt-uncensored |
128K | ✓ Available | High-performance general purpose model |
| Status | Code | Description |
|---|---|---|
| 401 | unauthorized | Invalid or missing API key |
| 402 | insufficient_tokens | Not enough token balance — top up in dashboard |
| 429 | rate_limited | Too many requests. Slow down. |
| 500 | server_error | Internal error. Please retry. |
WormGPT is fully compatible with the official OpenAI Python library.
# Install
pip install openai
# Usage
from openai import OpenAI
client = OpenAI(
api_key="wgpt-your-key",
base_url="https://api.wormgpt.pw/v1"
)
response = client.chat.completions.create(
model="wormgpt-uncensored",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
// Install: npm install openai
const OpenAI = require('openai');
const client = new OpenAI({
apiKey: 'wgpt-your-key',
baseURL: 'https://api.wormgpt.pw/v1'
});
const response = await client.chat.completions.create({
model: 'wormgpt-uncensored',
messages: [{ role: 'user', content: 'Hello!' }]
});
console.log(response.choices[0].message.content);
curl https://api.wormgpt.pw/v1/chat/completions \
-H "Authorization: Bearer wgpt-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "wormgpt-uncensored",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Manage your account directly from Telegram — top up balance, get your API key, and access the dashboard without a browser.
| Action | How |
|---|---|
| Get API key | Tap 🔑 API ключ |
| Check balance | Tap 💰 Мой баланс |
| Top up with crypto | Tap 💳 Пополнить → 💎 Крипто |
| Top up with Stars | Tap 💳 Пополнить → ⭐ Звёзды (1,600 Stars = 1M tokens) |
| Open dashboard | Tap 🌐 Открыть WormGPT |