SmartPDF Tasks API

The tasks API from SmartPDF — 3 operation(s) for tasks.

GitHub OpenAPI

Operations 3

GET /v1/tasks/{task_id} Get Task Status #
GET /v1/tasks/{task_id}/download Get Download Url #
GET /v1/tasks/{task_id}/file Download File #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/smartpdf-ru:smartpdf-ru-tasks-api"
All apis
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.

Get an API 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 Specification

smartpdf-ru-tasks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SmartPDF Tasks 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: Tasks
paths:
  /v1/tasks/{task_id}:
    get:
      tags:
      - Tasks
      summary: Get Task Status
      operationId: get_task_status_v1_tasks__task_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      - name: X-API-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskStatusResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/tasks/{task_id}/download:
    get:
      tags:
      - Tasks
      summary: Get Download Url
      operationId: get_download_url_v1_tasks__task_id__download_get
      security:
      - HTTPBearer: []
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      - name: X-API-Key
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DownloadUrlResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /v1/tasks/{task_id}/file:
    get:
      tags:
      - Tasks
      summary: Download File
      operationId: download_file_v1_tasks__task_id__file_get
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
          title: Task Id
      - name: token
        in: query
        required: true
        schema:
          type: string
          title: Token
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DownloadUrlResponse:
      properties:
        download_url:
          type: string
          title: Download Url
        expires_at:
          type: string
          format: date-time
          title: Expires At
        filename:
          type: string
          title: Filename
      type: object
      required:
      - download_url
      - expires_at
      - filename
      title: DownloadUrlResponse
    TaskStatusResponse:
      properties:
        task_id:
          type: string
          title: Task Id
        status:
          type: string
          title: Status
        progress:
          type: integer
          title: Progress
          default: 0
        estimated_seconds:
          anyOf:
          - type: integer
          - type: 'null'
          title: Estimated Seconds
        input_file_size:
          anyOf:
          - type: integer
          - type: 'null'
          title: Input File Size
        output_file_size:
          anyOf:
          - type: integer
          - type: 'null'
          title: Output File Size
        error:
          anyOf:
          - type: string
          - type: 'null'
          title: Error
        stage:
          anyOf:
          - type: string
          - type: 'null'
          title: Stage
      type: object
      required:
      - task_id
      - status
      title: TaskStatusResponse
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer