SmartPDF Pricing API
The pricing API from SmartPDF — 2 operation(s) for pricing.
The pricing API from SmartPDF — 2 operation(s) for pricing.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/smartpdf-ru:smartpdf-ru-pricing-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: SmartPDF Pricing API
description: 'Все операции асинхронные: `POST /v1/pdf/…` возвращает `task_id`, статус — `GET /v1/tasks/{task_id}`.
Авторизация — заголовок `X-API-Key` с ключом из кабинета (раздел «API и MCP»).
Запрос оплачивается с баланса API аккаунта (общий для всех ключей и MCP) по единицам: единица — каждые
начатые 10 МБ входа (файл до 10 МБ — 1 единица, 25 МБ — 3; у объединения считается сумма файлов). Тяжёлые
операции — ещё и по страницам, берётся большее: распознавание текста (OCR) — единица за каждые 10 страниц
(до 100 страниц за раз, больше — `422` без списания), PDF в Word / Excel / PowerPoint / JPG — за каждые
50 страниц (JPG 300 dpi — за 25). Цена единицы и ставки — `GET /v1/pricing/api` (`request_price`,
`page_rates`); цену меняют в админке, поэтому не зашивайте её в код. На тарифе
Бизнес сначала расходуются 500 включённых обычных запросов месяца. Нет денег на балансе или исчерпан
лимит ключа — `402` с объяснением, ничего не списано. Ошибка обработки возвращает оплату автоматически.
Остаток — `GET /v1/api-keys/balance` (`balance`, `spent_month`, `request_price`, `included_remaining`),
списанное — `charge` и `charge_units` в `GET /v1/account/operations`. Пополнение, лимиты ключей,
перевыпуск и удаление — в кабинете (раздел «API и MCP»).
## Вебхуки
Передайте в запросе операции `webhook_url` (только https) — по завершении SmartPDF отправит на него
`POST` с JSON: `event` (`task.done` / `task.failed`), `task_id`, `operation_type`, `status`, `timestamp`,
`download_url` и `filename` (для `task.done`, ссылка действует 1 час) или `error_message`.
Имя результата — `_smartpdf.` (оно же в заголовке `Content-Disposition`).
Ответьте кодом 2xx; иначе будет ещё 3 попытки (через 10, 30 и 90 секунд). Редиректы не выполняются.
Заголовки: `X-SmartPDF-Event`, `X-SmartPDF-Delivery` (id операции, одинаков у повторов — по нему
отсекайте дубли) и `X-SmartPDF-Signature: t=,v1=`.
**Проверка подписи.** Секрет — кабинет → «API и MCP» (там же выпускается новый, старый сразу
перестаёт действовать).
Подпись — HMAC-SHA256 от строки `.` в hex. Сравнивайте в постоянном
времени и отклоняйте запросы старше 5 минут.
```python
import hashlib, hmac, time
def verify(secret: str, body: bytes, header: str) -> bool:
parts = dict(p.split("=", 1) for p in header.split(","))
ts = int(parts["t"])
if abs(time.time() - ts) > 300:
return False
expected = hmac.new(secret.encode(), f"{ts}.".encode() + body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, parts["v1"])
```
```javascript
const crypto = require("crypto");
function verify(secret, rawBody, header) {
const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
if (Math.abs(Date.now() / 1000 - Number(parts.t)) > 300) return false;
const expected = crypto.createHmac("sha256", secret).update(`${parts.t}.`).update(rawBody).digest("hex");
return expected.length === parts.v1.length &&
crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}
```'
version: 1.0.0
servers:
- url: https://api.smartpdf.ru
tags:
- name: Pricing
paths:
/v1/pricing:
get:
tags:
- Pricing
summary: Get Public Pricing
operationId: get_public_pricing_v1_pricing_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
items:
$ref: '#/components/schemas/PriceItem'
type: array
title: Response Get Public Pricing V1 Pricing Get
/v1/pricing/api:
get:
tags:
- Pricing
summary: Get Api Pricing
operationId: get_api_pricing_v1_pricing_api_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ApiPricing'
components:
schemas:
ApiPricing:
properties:
request_price:
type: string
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
title: Request Price
request_unit_mb:
type: integer
title: Request Unit Mb
topup_min:
type: string
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
title: Topup Min
topup_max:
type: string
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
title: Topup Max
trial:
type: string
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
title: Trial
business_included:
type: integer
title: Business Included
bonuses:
items:
$ref: '#/components/schemas/TopupBonus'
type: array
title: Bonuses
page_rates:
items:
$ref: '#/components/schemas/PageRate'
type: array
title: Page Rates
ocr_max_pages:
type: integer
title: Ocr Max Pages
type: object
required:
- request_price
- request_unit_mb
- topup_min
- topup_max
- trial
- business_included
- bonuses
- page_rates
- ocr_max_pages
title: ApiPricing
description: Условия API/MCP для лендинга и кабинета — одно место вместо копий на фронтенде.
TopupBonus:
properties:
from_amount:
type: string
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
title: From Amount
percent:
type: integer
title: Percent
type: object
required:
- from_amount
- percent
title: TopupBonus
PriceItem:
properties:
key:
type: string
title: Key
category:
type: string
title: Category
amount:
type: string
pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
title: Amount
currency:
type: string
title: Currency
type: object
required:
- key
- category
- amount
- currency
title: PriceItem
PageRate:
properties:
operation_type:
type: string
title: Operation Type
pages_per_unit:
type: integer
title: Pages Per Unit
min_dpi:
anyOf:
- type: integer
- type: 'null'
title: Min Dpi
type: object
required:
- operation_type
- pages_per_unit
title: PageRate
securitySchemes:
HTTPBearer:
type: http
scheme: bearer