← GhostGPT

GhostGPT API

OpenAI-совместимый HTTP API к модели GhostGPT. Работает по ключу и требует действующей подписки. Веб-чат: ghostgpt.io

OpenAI-compatible HTTP API for the GhostGPT model. Works with an API key and requires an active subscription. Web chat: ghostgpt.io

Главная ссылка для интеграции (Base URL): Main integration link (Base URL): https://api.ghostgpt.io/v1

С чего начать

Getting started

Три шага, каждый занимает минуту.

Three steps, a minute each.

  1. Откройте ghostgpt.io/join.html и получите доступ. Первые три дня бесплатны — регистрация без почты и телефона, только токен.
  2. Оплатите подписку: на сайте — криптовалюта или СБП по QR (для России), внутри Telegram — Telegram Stars или банковская карта (крипта и СБП там тоже есть). Платёж разовый, без автосписаний.
  3. На той же странице нажмите «Получить ключ API». Ключ показывается ровно один раз.
  1. Open ghostgpt.io/join.html and get access. The first three days are free — no email, no phone, just a token.
  2. Pay for a subscription: on the site — crypto or SBP QR (Russia), inside Telegram — Telegram Stars or a bank card (crypto and SBP are there too). One-off payment, no recurring charges.
  3. On the same page press “Get API key”. The key is shown exactly once.

Дальше — настройки клиента:

Then configure your client:

ПолеЗначение
Base URL / API URLhttps://api.ghostgpt.io/v1
Modelghostgpt
API KeySK-… (заголовок Authorization: Bearer)
FieldValue
Base URL / API URLhttps://api.ghostgpt.io/v1
Modelghostgpt
API KeySK-… (Authorization: Bearer header)

Проверка одной командой — она не тратит квоту:

One-command check — it does not consume quota:

curl https://api.ghostgpt.io/v1/models \
  -H "Authorization: Bearer SK-YOUR-KEY"

Машиночитаемый манифест: /api.json

Machine-readable manifest: /api.json

Важно: https://api.ghostgpt.io/v1 — это Base URL для клиента, а не страница в браузере. Документация живёт на /, проверка ключа — на /v1/models.

Note: https://api.ghostgpt.io/v1 is a client Base URL, not a browsable page. Docs live at /; check the key at /v1/models.

Доступ и оплата

Access & billing

Документация открыта всем. Сам API работает, пока подписка оплачена.

The documentation is public. The API itself works while the subscription is paid.

СостояниеВеб-чатAPI по ключу
Триал (3 дня)100 сообщений в суткинет — ключ выдаётся только после оплаты
Оплачено300 сообщений в сутки (региональный тариф — 50)250 из тех же 300 (на региональном — вся норма 50)
Первые 72 часа после конца оплаты10 сообщений в сутки10 в сутки + заголовок Warning
Дальше10 сообщений в сутки402 subscription_required
StateWeb chatAPI key
Trial (3 days)100 messages/daynone — keys are issued after payment
Paid300 messages/day (regional plan — 50)250 out of the same 300 (regional — the whole 50)
First 72h after expiry10 messages/day10/day + Warning header
After that10 messages/day402 subscription_required

Пул общий. Ключ и браузер черпают из одной суточной квоты аккаунта. На стандартном тарифе ключу отдано 250 из 300, чтобы ночной скрипт не оставил вас без чата утром: 50 сообщений остаются веб-интерфейсу. На региональном тарифе (Индия, Пакистан, Бангладеш, Нигерия, Индонезия, Вьетнам) норма — 50 сообщений в сутки, и ключ может выбрать её целиком: резерва для браузера там нет.

One shared pool. The key and the browser draw from the same daily account quota. On the standard plan the key gets 250 out of 300 so that a nightly script cannot leave you without the chat in the morning: 50 messages stay reserved for the web UI. On the regional plan (India, Pakistan, Bangladesh, Nigeria, Indonesia, Vietnam) the allowance is 50 messages a day and the key may use all of it: nothing is reserved for the browser there.

72 часа после истечения — не подарок, а защита от простоя: подписка может кончиться в три часа ночи, и ваш продакшен обязан дожить до утра. В эти часы каждый ответ несёт заголовок Warning: 199 ghostgpt "…", а лимит падает до бесплатного.

The 72-hour window is not a gift but downtime protection: a subscription can expire at 3 a.m., and your production must survive until morning. During that window every response carries Warning: 199 ghostgpt "…" and the limit drops to the free tier.

После новой оплаты ключ оживает сам — перевыпускать его не нужно, доступ считается по сроку подписки. Оплаченные дни складываются с остатком, а не заменяют его.

After a new payment the key comes back on its own — no re-issue needed, access follows the subscription date. Paid days are added to whatever is left, not substituted for it.

Цены и сроки — на странице доступа. Оплата разовая: автосписаний нет, карта не привязывается.

Prices and terms are on the access page. Payments are one-off: no recurring charges, no stored cards.

Ключ

API key

Authorization: Bearer SK-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX

Управление ключом

Managing the key

Через интерфейс — на странице доступа. Через HTTP (нужна cookie сессии, то есть вход по токену):

Through the UI — on the access page. Over HTTP (requires the session cookie, i.e. sign-in by token):

МетодПутьЧто делает
GETghostgpt.io/api/access/apikeyЕсть ли ключ, когда создан, когда им пользовались. Секрета не отдаёт.
POSTghostgpt.io/api/access/apikeyВыдать или перевыпустить. Требует оплаченной подписки, иначе 402.
POSTghostgpt.io/api/access/apikey/revokeПогасить ключ. Действует немедленно.
MethodPathWhat it does
GETghostgpt.io/api/access/apikeyWhether a key exists, when it was created and last used. Never returns the secret.
POSTghostgpt.io/api/access/apikeyIssue or rotate. Requires an active subscription, otherwise 402.
POSTghostgpt.io/api/access/apikey/revokeRevoke the key. Takes effect immediately.
{
  "key": {"key_id": "K7ZQ3M2X1", "created_at": 1787930020, "last_used_at": null},
  "tier": "paid",
  "paid_until": 1790522020,
  "limits": {
    "daily_messages": 300,
    "api_daily_messages": 250,
    "api_daily_out_tokens": 150000,
    "grace_seconds": 259200
  },
  "secret": "SK-…"
}

Поле secret приходит только в ответе на выдачу — больше нигде и никогда.

The secret field appears only in the issue response — nowhere else, ever.

Где принимается ключ

Where the key is accepted

На api.ghostgpt.io (основной адрес), на ghostgpt.io — второй оставлен для клиентов, заведённых до появления отдельного домена, — и на onion-зеркале (см. ниже). Cookie веб-чата работает на ghostgpt.io, app.ghostgpt.io и на зеркале, но не на api.ghostgpt.io.

On api.ghostgpt.io (the main address), on ghostgpt.io — the latter is kept for clients set up before the separate domain existed — and on the onion mirror (see below). The web-chat cookie works on ghostgpt.io, app.ghostgpt.io and on the mirror, but not on api.ghostgpt.io.

Если в Authorization положить токен входа (GG-…) вместо ключа, ответ будет 401 use_api_key — это самая частая ошибка первого дня, и она названа отдельно, чтобы вы не искали опечатку.

Putting a sign-in token (GG-…) into Authorization instead of a key returns 401 use_api_key — the most common first-day mistake, named separately so you do not go hunting for a typo.

Доступ через Tor

Access over Tor

Тот же API отвечает на onion-зеркале — без выхода в обычный интернет и без DNS:

The same API answers on the onion mirror — with no exit to the ordinary internet and no DNS:

http://ghostgptdcxf76dzznn6wv4gzruvfs4h4bx7rootrwluxxvbtujiueqd.onion/v1

Ключ предъявляется так же, тем же заголовком Authorization; отдельного адреса вида api.…onion нет и не нужно. Схема только http: сертификата для .onion не существует, шифрование и подлинность адреса обеспечивает сама сеть Tor.

The key is presented the same way, in the same Authorization header; there is no separate api.…onion address and none is needed. The scheme is http only: no certificate exists for .onion, and encryption plus address authenticity come from the Tor network itself.

curl --socks5-hostname 127.0.0.1:9050 \
  http://ghostgptdcxf76dzznn6wv4gzruvfs4h4bx7rootrwluxxvbtujiueqd.onion/v1/chat/completions \
  -H "Authorization: Bearer SK-…" \
  -H "Content-Type: application/json" \
  -d '{"model":"ghostgpt","messages":[{"role":"user","content":"ping"}]}'

В библиотеке OpenAI достаточно подменить base_url и направить транспорт в SOCKS5-порт Tor (обычно 9050; в Tor Browser — 9150).

With the OpenAI library it is enough to swap base_url and point the transport at Tor's SOCKS5 port (usually 9050; 9150 in Tor Browser).

Предел «запросов в минуту с адреса» на зеркале работает иначе. Адреса клиента там не существует: соединение приходит от локального демона Tor, и по адресу все гости зеркала неотличимы. Поэтому счёт ведётся по cookie входа, а запросы без неё — а это как раз запросы с API-ключом — попадают в общее ведро зеркала. Если вам нужен предсказуемый предел, ходите на api.ghostgpt.io; ограничение «один запрос в момент времени на аккаунт» действует одинаково везде.

The per-IP rate limit works differently on the mirror. There is no client address there: the connection arrives from the local Tor daemon, so by address all mirror visitors are indistinguishable. Counting therefore goes by the sign-in cookie, and requests without one — which is exactly what API-key requests are — fall into the mirror's shared bucket. If you need a predictable limit, use api.ghostgpt.io; the "one request at a time per account" rule applies everywhere alike.

Модель

Model

СвойствоЗначение
Идентификаторghostgpt
Псевдонимыghostgpt, default, auto
Контекст32 768 токенов на запрос
Ответдо 16 384 токенов
Модальноститекст и изображения на входе, текст на выходе
Одна картинкадо 768 токенов
Цепочка рассужденийвыключена — ответ приходит сразу
PropertyValue
Identifierghostgpt
Aliasesghostgpt, default, auto
Context32,768 tokens per request
Responseup to 16,384 tokens
Modalitiestext and images in, text out
One imageup to 768 tokens
Reasoning tracesoff — the answer arrives directly

Любое значение поля model переписывается на текущую модель. Прислали gpt-4o — получите тот же ghostgpt, ошибки не будет. В ответе всегда стоит "model": "ghostgpt".

Whatever you put in model is rewritten to the current model. Send gpt-4o and you still get ghostgpt, without an error. Responses always carry "model": "ghostgpt".

Модель обслуживает два запроса одновременно на весь сервис. Отсюда ограничение «один запрос за раз на аккаунт» — см. Лимиты.

The model serves two concurrent requests for the whole service. Hence the “one request at a time per account” rule — see Limits.

Эндпоинты

Endpoints

МетодПутьНазначениеТратит квоту
POST/v1/chat/completionsЧат — единственная ручка генерациида, 1 сообщение
GET/v1/modelsСписок моделей, проверка ключанет
GET/healthЖив ли сервис (без ключа)нет
MethodPathPurposeCosts quota
POST/v1/chat/completionsChat — the only generation endpointyes, 1 message
GET/v1/modelsList models, verify the keyno
GET/healthService liveness (no key needed)no

Любой другой путь под /v1/ отвечает 404 unknown_endpoint в формате ошибки OpenAI — в том числе /v1/completions, /v1/embeddings, /v1/responses, /v1/messages.

Any other path under /v1/ returns 404 unknown_endpoint in the OpenAI error format — including /v1/completions, /v1/embeddings, /v1/responses, /v1/messages.

/v1/models никогда не отвечает 402. Это ручка, которой библиотеки проверяют связь при старте: отказ по выбранной квоте означал бы, что приложение не может подняться до полуночи UTC, не потратив ни одного токена.

/v1/models never returns 402. Client libraries call it at startup: refusing on an exhausted quota would mean the app cannot even boot until midnight UTC without spending a single token.

Chat Completions

Формат — как у OpenAI Chat API. Совместимость проверена на официальном SDK openai для Python и Node без единой правки.

Same shape as the OpenAI Chat API. Verified against the official openai SDK for Python and Node with no changes.

curl

curl https://api.ghostgpt.io/v1/chat/completions \
  -H "Authorization: Bearer SK-YOUR-KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ghostgpt",
    "messages": [
      {"role": "user", "content": "Hello! What is GhostGPT API?"}
    ],
    "max_tokens": 512
  }'

Python (openai)

pip install openai

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.ghostgpt.io/v1",
    api_key=os.environ["GHOSTGPT_API_KEY"],   # ключ — в окружении, не в коде
)

resp = client.chat.completions.create(
    model="ghostgpt",
    messages=[{"role": "user", "content": "Hello"}],
    max_tokens=512,
)
print(resp.choices[0].message.content)
print(resp.usage.completion_tokens)          # объём выдачи учитывается всегда

Node (openai)

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.ghostgpt.io/v1",
  apiKey: process.env.GHOSTGPT_API_KEY,
});

const r = await client.chat.completions.create({
  model: "ghostgpt",
  messages: [{ role: "user", content: "Hello" }],
  max_tokens: 512,
});
console.log(r.choices[0].message.content);

Обработка отказов

Handling refusals

import time, httpx

def ask(client, messages, tries=3):
    for i in range(tries):
        try:
            return client.chat.completions.create(model="ghostgpt", messages=messages)
        except httpx.HTTPStatusError as e:
            code = e.response.status_code
            if code == 429:                       # свой же параллельный запрос
                time.sleep(int(e.response.headers.get("Retry-After", 5)))
                continue
            if code == 503:                       # модель занята или перезапускается
                time.sleep(int(e.response.headers.get("Retry-After", 5)))
                continue
            raise                                 # 401 и 402 повторять бессмысленно
    raise RuntimeError("giving up")

Повторять стоит только 429 и 503. 401 означает неверный ключ, 402 — кончилась подписка или квота: ни то ни другое от повтора не исправится.

Only 429 and 503 are worth retrying. 401 means a bad key, 402 means the subscription or quota is out: neither is fixed by retrying.

Стриминг

Streaming

Добавьте "stream": true — ответ пойдёт чанками SSE, как в OpenAI.

Add "stream": true and the answer arrives as SSE chunks, OpenAI-style.

curl -N https://api.ghostgpt.io/v1/chat/completions \
  -H "Authorization: Bearer SK-YOUR-KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ghostgpt",
    "stream": true,
    "messages": [{"role": "user", "content": "Write a short poem"}]
  }'

Изображения

Images

Формат OpenAI: base64 data-URI или ссылка.

OpenAI format: base64 data-URI or a URL.

{
  "model": "ghostgpt",
  "messages": [{
    "role": "user",
    "content": [
      {"type": "text", "text": "What is in this image?"},
      {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}}
    ]
  }]
}

Что сервер меняет в запросе

What the server rewrites

Шлюз не проксирует тело как есть. Перечислено всё, что он трогает, — остальное уходит в модель нетронутым.

The gateway does not pass the body through untouched. Everything it changes is listed below; the rest goes to the model as is.

ПолеЧто происходит
modelПереписывается на текущую модель.
messages[role=system], messages[role=developer]Клиентский системный промпт отбрасывается — роль developer считается тем же system, — подставляется серверный. Личность и правила GhostGPT переопределить нельзя.
max_tokensПриводится к диапазону 32…16384. Нет поля, ноль, отрицательное или не целое — 16384. Меньше 32 — поднимается до 32.
repeat_penalty, frequency_penalty, repeat_last_nrepeat_penalty и frequency_penalty поднимаются до нижней границы (1.12 / 0.25). repeat_last_n меньше 64 (или не целое) заменяется на 128; 64 и больше проходит как есть. Ниже — модель уходит в петлю и жжёт GPU впустую.
grammar, grammar_type, grammar_lazy, grammar_triggers, json_schemaУдаляются. Грамматика — это способ повесить движок одним запросом.
response_formatjson_object и json_schema удаляются; ответ придёт текстом с кодом 200. Строгого JSON нет.
logit_bias и родственныеУдаляются.
stream_options.include_usageПринудительно true для потоковых запросов.
FieldWhat happens
modelRewritten to the current model.
messages[role=system], messages[role=developer]Your system prompt is dropped — the developer role is treated as system — and the server’s one is injected. GhostGPT’s persona and rules cannot be overridden.
max_tokensClamped to 32…16384. Missing, zero, negative or not an integer becomes 16384. Below 32 is raised to 32.
repeat_penalty, frequency_penalty, repeat_last_nrepeat_penalty and frequency_penalty are raised to the floor (1.12 / 0.25). repeat_last_n below 64 (or not an integer) is replaced with 128; 64 and above passes unchanged. Below that the model loops and burns GPU for nothing.
grammar, grammar_type, grammar_lazy, grammar_triggers, json_schemaRemoved. A grammar is a way to hang the engine with a single request.
response_formatjson_object and json_schema are removed; you get plain text with status 200. There is no strict JSON mode.
logit_bias and relativesRemoved.
stream_options.include_usageForced to true for streaming requests.

На выходе стоят три сторожа: утечка внутреннего промпта, вырожденный повтор и курсы валют, названные без данных с сайта. Каждый обрывает ответ — в потоке тоже.

Three output guards are in place: internal-prompt leakage, degenerate repetition, and FX rates quoted without web data. Each one cuts the answer short — in streaming mode as well.

Лимиты

Limits

ЧтоСколькоЧто при превышении
Сообщений в сутки на аккаунт300 (оплачено)402 quota_exceeded
Из них ключу250 (на региональном тарифе — вся норма 50)402 api_quota_exceeded, в браузере ещё можно писать; на региональном тарифе — 402 quota_exceeded, пул выбран целиком
Выданных токенов в сутки150 000402 token_quota_exceeded
Одновременных запросов1 на аккаунт429 concurrent_request, Retry-After: 5
Запросов в минуту с адреса30, всплеск до 15429 rate_limit
Размер тела32 МБ413 request_too_large
Одна генерация600 секундобрыв
WhatHow muchOn excess
Messages per day per account300 (paid)402 quota_exceeded
Of those, for the key250 (regional plan — the whole 50)402 api_quota_exceeded, the browser still works; on the regional plan — 402 quota_exceeded, the whole pool is spent
Output tokens per day150,000402 token_quota_exceeded
Concurrent requests1 per account429 concurrent_request, Retry-After: 5
Requests per minute per IP30, burst 15429 rate_limit
Body size32 MB413 request_too_large
Single generation600 secondscut off

Счётчики обнуляются в 00:00 UTC. Точное время сброса приходит заголовком, гадать не нужно.

Counters reset at 00:00 UTC. The exact reset time comes back in a header, no guessing needed.

Заголовки состояния

State headers

ЗаголовокЗначение
X-GhostGPT-Quota-LimitСколько сообщений в сутки доступно ключу
X-GhostGPT-Quota-RemainingСколько осталось прямо сейчас
X-GhostGPT-Quota-ResetUnix-время обнуления счётчиков
X-GhostGPT-Subscription-UntilUnix-время конца подписки
X-GhostGPT-Key-IdПубличный ярлык ключа
Warning: 199 ghostgpt "…"Подписка кончается меньше чем через 72 часа или уже кончилась
X-Request-IDИдентификатор запроса — назовите его в письме, и мы найдём вашу строку в журнале
HeaderMeaning
X-GhostGPT-Quota-LimitDaily messages available to the key
X-GhostGPT-Quota-RemainingHow many are left right now
X-GhostGPT-Quota-ResetUnix time when counters reset
X-GhostGPT-Subscription-UntilUnix time when the subscription ends
X-GhostGPT-Key-IdPublic label of the key
Warning: 199 ghostgpt "…"The subscription ends in under 72 hours, or has ended
X-Request-IDRequest identifier — quote it in an email and we will find your log line

Почему один запрос за раз. Модель обслуживает два запроса на весь сервис, и пул из десяти потоков занимает её целиком — веб-чат встаёт у всех, включая вас. Ограничитель не «сколько в минуту» (это делает отдельный лимит по адресу), а «сколько прямо сейчас».

Why one request at a time. The model serves two requests for the entire service, and a ten-thread pool takes it over completely — the web chat stalls for everyone, you included. This limiter is not about “per minute” (that is the separate per-IP limit) but about “right now”.

Квота занимается до обращения к модели и возвращается, если модель не ответила или поток лопнул, не отдав ни байта. Обрыв соединения вашей стороной возвратом не считается.

Quota is reserved before the model call and refunded if the model failed or the stream broke without a single byte. Your own disconnect is not a refund case.

Ошибки

Errors

Тело ошибки на /v1/* — JSON в формате OpenAI; на api.ghostgpt.io так отвечает и сам прокси (404, 413, 429), а на запасном ghostgpt.io/v1 ошибки прокси приходят его HTML-страницей. Вспомогательные ручки ghostgpt.io/api/* отвечают плоским {"error": "<code>"}.

Error bodies on /v1/* are JSON in the OpenAI format; on api.ghostgpt.io this includes the proxy’s own responses (404, 413, 429), while on the legacy ghostgpt.io/v1 proxy errors come as its HTML page. The auxiliary endpoints on ghostgpt.io/api/* reply with a flat {"error": "<code>"}.

{
  "error": {
    "message": "Human-readable explanation",
    "type": "insufficient_quota",
    "code": "subscription_required",
    "request_id": "09ba82f5aa9ed61b"
  }
}
HTTPcodeЧто случилось и что делать
400invalid_request_bodyТело — не валидный JSON. Чаще всего большое вложение не догрузилось целиком: повторите или уменьшите файл.
400context_length_exceededДиалог длиннее окна контекста модели. В теле tokens_requested и context_window, если движок сообщил числа. Начните новый диалог или уберите старые сообщения.
401unauthorizedЗаголовка Authorization нет вовсе.
401invalid_api_keyКлюч не найден. Проверьте, что скопирован целиком, вместе с SK-.
401revoked_api_keyКлюч отозван — вами или перевыпуском. Получите новый.
401use_api_keyВ Authorization лежит токен входа GG-…. Нужен ключ SK-….
402subscription_requiredПодписка кончилась (и 72 часа тоже). В теле есть expired_at и plans_url.
402quota_exceededСуточный пул аккаунта выбран. В теле reset_at.
402api_quota_exceededВыбрана доля ключа (250). Веб-чат ещё работает. На региональном тарифе доля ключа равна всей норме (50), поэтому там вместо этого кода приходит quota_exceeded.
402token_quota_exceededКончился суточный бюджет выданных токенов.
403account_blockedАккаунт заблокирован. Повторы не помогут — напишите нам.
404unknown_endpointТакой ручки нет. Список — в разделе «Эндпоинты».
413request_too_largeТело больше 32 МБ. Уменьшите вложение или разбейте диалог.
413payload_too_largeТело больше 100 МБ — на api.ghostgpt.io его отрезает прокси ещё до шлюза, без request_id. Предел тот же — 32 МБ.
429rate_limitСлишком часто с одного адреса. Ждите Retry-After.
429concurrent_requestУ аккаунта уже идёт запрос. Дождитесь ответа, потом шлите следующий.
500internal_errorНеобработанная ошибка сервиса. Повторите запрос; если повторяется — пришлите X-Request-ID.
503model_loadingМодель поднимается или перезапущена сторожем. Повторить через 5 секунд.
503model_busyОчередь к модели не рассосалась за 240 секунд ожидания. Сообщение из квоты не списано. Повторить через Retry-After (15 секунд).
503capacity_exhaustedСервис исчерпал суточную ёмкость для API. Повторить после 00:00 UTC.
HTTPcodeWhat happened and what to do
400invalid_request_bodyThe body is not valid JSON. Usually a large attachment did not upload completely: retry or use a smaller file.
400context_length_exceededThe conversation is longer than the model’s context window. The body carries tokens_requested and context_window when the engine reported the numbers. Start a new chat or drop older messages.
401unauthorizedNo Authorization header at all.
401invalid_api_keyKey not found. Check it was copied whole, including SK-.
401revoked_api_keyThe key was revoked — by you or by a rotation. Issue a new one.
401use_api_keyAuthorization carries a sign-in token GG-…. An SK-… key is required.
402subscription_requiredThe subscription ended (and so did the 72-hour window). The body carries expired_at and plans_url.
402quota_exceededThe daily account pool is spent. The body carries reset_at.
402api_quota_exceededThe key’s share (250) is spent. The web chat still works. On the regional plan the key’s share equals the whole allowance (50), so you get quota_exceeded there instead.
402token_quota_exceededThe daily output-token budget is spent.
403account_blockedThe account is blocked. Retrying will not help — contact us.
404unknown_endpointNo such endpoint. See the Endpoints section.
413request_too_largeBody over 32 MB. Shrink the attachment or split the conversation.
413payload_too_largeBody over 100 MB — on api.ghostgpt.io the proxy cuts it off before the gateway, with no request_id. The limit is still 32 MB.
429rate_limitToo frequent from one address. Wait for Retry-After.
429concurrent_requestA request from this account is already running. Wait for it, then send the next one.
500internal_errorUnhandled service error. Retry the request; if it persists, send us the X-Request-ID.
503model_loadingThe model is starting or was restarted by the watchdog. Retry in 5 seconds.
503model_busyThe queue to the model did not clear within the 240-second wait. The message is not charged to your quota. Retry after Retry-After (15 seconds).
503capacity_exhaustedThe service ran out of daily API capacity. Retry after 00:00 UTC.

Чего API не умеет

What the API does not do

Здесь честнее сказать сразу, чем оставить это на первый день интеграции.

Better said upfront than discovered on day one of your integration.

Вспомогательные ручки (ghostgpt.io)

Auxiliary endpoints (ghostgpt.io)

Это не часть OpenAI-совместимого /v1. Они живут на основном домене, принимают тот же ключ и требуют действующей оплаты. Квоту сообщений не тратят, но у каждой свой предел частоты.

These are not part of the OpenAI-compatible /v1. They live on the main domain, accept the same key and require an active subscription. They do not consume the message quota, but each has its own rate limit.

ПутьЧто делаетВ минуту
POST /api/fetch-urlСкачивает страницу и отдаёт текст (до 80 000 символов), заголовок, описание, иконку40
POST /api/web-researchПодбирает источники по вопросу: курсы валют, погода25
POST /api/pdf/extractТекст из PDF (до 50 МБ, до 400 страниц)60
POST /api/transcribeРаспознавание речи (до 25 МБ и 30 минут звука, модель whisper base)8
POST /api/shareПубличная ссылка на диалог (до 2 МБ)30
GET /api/share/{id}Снимок диалога — публично, без ключа30
PathWhat it doesPer minute
POST /api/fetch-urlFetches a page and returns text (up to 80,000 chars), title, description, favicon40
POST /api/web-researchPicks sources for a query: FX rates, weather25
POST /api/pdf/extractText from PDF (up to 50 MB, 400 pages)60
POST /api/transcribeSpeech recognition (up to 25 MB and 30 minutes of audio, whisper base)8
POST /api/sharePublic link to a conversation (up to 2 MB)30
GET /api/share/{id}Conversation snapshot — public, no key30
curl -X POST https://ghostgpt.io/api/fetch-url \
  -H "Authorization: Bearer SK-YOUR-KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

Модель сама курсы валют не называет — сторож на выходе отклоняет такой ответ. Если вам нужны курсы, вызовите /api/web-research и вложите полученный текст в сообщение пользователя.

The model will not quote FX rates by itself — an output guard rejects such answers. If you need rates, call /api/web-research and paste the returned text into the user message.

Приватность

Privacy

Вопросы

FAQ

Ключ перестал работать посреди дня — почему?

The key stopped working mid-day — why?

Посмотрите code в теле ответа. api_quota_exceeded — выбрана доля ключа, сбросится в 00:00 UTC. quota_exceeded — выбран весь суточный пул аккаунта (на региональном тарифе приходит именно он). subscription_required — кончилась оплата. revoked_api_key — ключ перевыпущен, и где-то работает старая копия.

Check code in the response body. api_quota_exceeded — the key’s share is spent, resets at 00:00 UTC. quota_exceeded — the whole daily account pool is spent (on the regional plan this is the code you get). subscription_required — the subscription ended. revoked_api_key — the key was rotated and an old copy is still deployed somewhere.

Можно один ключ на команду?

Can a team share one key?

Технически да, но квота одна на аккаунт, а одновременный запрос — один. Для двух независимых нагрузок дешевле два аккаунта, чем очередь из 429.

Technically yes, but the quota is per account and only one request runs at a time. For two independent workloads, two accounts are cheaper than a queue of 429s.

Как проверить ключ, не тратя квоту?

How do I verify a key without spending quota?

GET /v1/models. Она не тратит ничего и никогда не отвечает 402; заодно вернёт заголовки с остатком квоты и сроком подписки.

GET /v1/models. It costs nothing and never returns 402; it also brings back headers with the remaining quota and subscription end.

Ответы иногда обрываются на середине

Answers sometimes cut off mid-sentence

Если finish_reason: "length" — упёрлись в max_tokens или сработал сторож повторов. Если "stop" и текст короткий — сработал сторож на утечку промпта или на курсы валют без данных.

With finish_reason: "length" you hit max_tokens or the repetition guard. With "stop" and a short text, the prompt-leak or FX guard fired.

Работает ли OpenAI SDK без правок?

Does the OpenAI SDK work unchanged?

Да. Достаточно подменить base_url и api_key. Модель называйте ghostgpt — впрочем, любое имя всё равно будет переписано.

Yes. Just swap base_url and api_key. Use ghostgpt as the model name — although any name gets rewritten anyway.

Что будет с интеграцией, если я забуду продлить?

What happens to my integration if I forget to renew?

72 часа она проживёт на бесплатном лимите и с заголовком Warning. За трое суток до конца подписки тот же заголовок приходит заранее — повесьте на него алерт, и сюрприза не будет.

It survives 72 hours on the free limit with a Warning header. The same header appears three days before expiry — hook an alert to it and there will be no surprise.

Куда писать, если что-то сломалось?

Where do I report a problem?

Через ghostgpt.io. Приложите X-Request-ID и key_id — этого хватит, чтобы найти вашу строку. Сам ключ присылать не нужно и не следует.

Via ghostgpt.io. Include X-Request-ID and key_id — that is enough to find your log line. Do not send the key itself.