faktry PDF API

The Pdf API from faktry — 9 operation(s) for pdf.

GitHub OpenAPI

Operations 9

POST /api/media/v1/pdf/createtext Create Text #
POST /api/media/v1/pdf/merge Merge PDFs #
POST /api/media/v1/pdf/split Split PDF #
POST /api/media/v1/pdf/compress Compress PDF #
POST /api/media/v1/pdf/extract Extract from PDF #
POST /api/media/v1/pdf/image PDF to Image #
POST /api/media/v1/pdf/encrypt Encrypt PDF #
POST /api/media/v1/pdf/create Create PDF #
POST /api/media/v1/pdf/mdconvert Convert to Markdown #

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/faktry-ai:faktry-ai-pdf-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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

faktry-ai-pdf-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: faktry Media PDF API
  description: '# faktry Media API


    A comprehensive API for AI-powered media processing including image generation/editing, video creation, audio processing, and PDF manipulation.


    ## Authentication


    All requests must include an `Authorization` header with a Bearer token:


    ```

    Authorization: Bearer

    ```


    Two token types are accepted:


    1. **API Key** (recommended for programmatic access): Tokens are prefixed with `mt_` and can be generated in your account settings. Example: `Authorization: Bearer mt_abc123...`

    2. **Supabase JWT**: The session JWT issued by Supabase auth, used by the web app and desktop client.


    ## Credits & Pricing


    All operations consume credits. Costs vary by operation and model:

    - Basic operations: 1-5 credits

    - AI-powered operations: 5-32 credits depending on model

    - Check individual operation descriptions for exact costs


    ## File Uploads


    - Use `multipart/form-data` for file uploads

    - File parameter names: `file`, `file0`, `file1`, etc. for multiple files

    - Maximum file sizes vary by subscription tier


    ## Async Operations


    Some operations run asynchronously and return a job ID. Poll the job status using the returned `poll_url`.'
  version: 1.0.0
  contact:
    name: Media Tools Support
    email: support@mediatools.com
servers:
- url: https://faktry.ai
  description: Production server
security:
- BearerAuth: []
tags:
- name: PDF
paths:
  /api/media/v1/pdf/createtext:
    post:
      operationId: pdf_createtext
      summary: Create Text
      description: 'Generate text content using AI models


        **Model Costs (credits):**

        - `gpt-5.6-sol`: 10 credits

        - `gpt-5.6-terra`: 5 credits

        - `gpt-5.6-luna`: 1 credits

        - `claude-opus-5`: 8 credits

        - `claude-sonnet-5-5`: 5 credits

        - `claude-sonnet-5`: 5 credits

        - `claude-haiku-4-5`: 2 credits'
      tags:
      - PDF
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                model:
                  type: string
                  enum:
                  - gpt-5.6-sol
                  - gpt-5.6-terra
                  - gpt-5.6-luna
                  - claude-opus-5
                  - claude-sonnet-5-5
                  - claude-sonnet-5
                  - claude-haiku-4-5
                  description: AI model to use for processing
                max_output_tokens:
                  type: number
                  minimum: 1
                  maximum: 16000
                prompt:
                  type: string
                  description: Text prompt for AI generation
              required:
              - model
              - prompt
      responses:
        '200':
          description: Processed text file
          content:
            application/json:
              schema:
                type: string
                format: binary
                description: Processed text file
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: File too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded or insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/media/v1/pdf/merge:
    post:
      operationId: pdf_merge
      summary: Merge PDFs
      description: 'Combine multiple PDF files into a single document


        **Cost:** 1 credits'
      tags:
      - PDF
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file0:
                  $ref: '#/components/schemas/FileUpload'
                file1:
                  $ref: '#/components/schemas/FileUpload'
                file2:
                  $ref: '#/components/schemas/FileUpload'
                file3:
                  $ref: '#/components/schemas/FileUpload'
                file4:
                  $ref: '#/components/schemas/FileUpload'
                file5:
                  $ref: '#/components/schemas/FileUpload'
                file6:
                  $ref: '#/components/schemas/FileUpload'
                file7:
                  $ref: '#/components/schemas/FileUpload'
                file8:
                  $ref: '#/components/schemas/FileUpload'
                file9:
                  $ref: '#/components/schemas/FileUpload'
              required:
              - file0
      responses:
        '200':
          description: Processed pdf file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
                description: Processed pdf file
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: File too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded or insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/media/v1/pdf/split:
    post:
      operationId: pdf_split
      summary: Split PDF
      description: 'Split a PDF into multiple files based on page ranges


        **Cost:** 1 credits'
      tags:
      - PDF
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                pages:
                  type: string
                  description: Page Ranges
                file:
                  $ref: '#/components/schemas/FileUpload'
              required:
              - pages
              - file
      responses:
        '200':
          description: Processed pdf file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
                description: Processed pdf file
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: File too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded or insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/media/v1/pdf/compress:
    post:
      operationId: pdf_compress
      summary: Compress PDF
      description: 'Reduce PDF file size by compressing images and removing unnecessary data


        **Cost:** 1 credits'
      tags:
      - PDF
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                quality:
                  type: number
                  minimum: 1
                  maximum: 100
                  default: 60
                  description: Image Quality
                remove_metadata:
                  type: boolean
                  default: true
                  description: Remove Metadata
                file:
                  $ref: '#/components/schemas/FileUpload'
              required:
              - quality
              - remove_metadata
              - file
      responses:
        '200':
          description: Processed pdf file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
                description: Processed pdf file
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: File too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded or insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/media/v1/pdf/extract:
    post:
      operationId: pdf_extract
      summary: Extract from PDF
      description: 'Extract text, images, or specific pages from PDF files


        **Cost:** 1 credits'
      tags:
      - PDF
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                  - text
                  - images
                  - pages
                  default: text
                  description: Extract Type
                pages:
                  type: string
                  description: Page Ranges (optional)
                file:
                  $ref: '#/components/schemas/FileUpload'
              required:
              - type
              - pages
              - file
      responses:
        '200':
          description: Processed pdf file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
                description: Processed pdf file
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: File too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded or insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/media/v1/pdf/image:
    post:
      operationId: pdf_image
      summary: PDF to Image
      description: 'Convert PDF pages to image files


        **Cost:** 1 credits'
      tags:
      - PDF
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                format:
                  type: string
                  enum:
                  - jpg
                  - png
                  default: jpg
                  description: Output Format
                quality:
                  type: number
                  minimum: 1
                  maximum: 100
                  default: 90
                  description: Image Quality
                pages:
                  type: string
                  description: Page Ranges (optional)
                file:
                  $ref: '#/components/schemas/FileUpload'
              required:
              - format
              - quality
              - pages
              - file
      responses:
        '200':
          description: Processed image file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
                description: Processed image file
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: File too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded or insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/media/v1/pdf/encrypt:
    post:
      operationId: pdf_encrypt
      summary: Encrypt PDF
      description: 'Add password protection and permissions to PDF files


        **Cost:** 1 credits'
      tags:
      - PDF
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                user_password:
                  type: string
                  description: User Password
                owner_password:
                  type: string
                  description: Owner Password (optional)
                permissions:
                  type: string
                  enum:
                  - print
                  - modify
                  - copy
                  - annot-forms
                  - fill-forms
                  - extract
                  - assemble
                  - print-high
                  default:
                  - print
                  - copy
                  description: Permissions
                file:
                  $ref: '#/components/schemas/FileUpload'
              required:
              - user_password
              - owner_password
              - permissions
              - file
      responses:
        '200':
          description: Processed pdf file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
                description: Processed pdf file
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: File too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded or insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/media/v1/pdf/create:
    post:
      operationId: pdf_create
      summary: Create PDF
      description: 'Generate PDF files from HTML, URLs, or office documents


        **Cost:** 1 credits'
      tags:
      - PDF
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                content_type:
                  type: string
                  enum:
                  - html
                  - url
                  - office
                  description: Content Type
                html_content:
                  type: string
                  description: HTML Content
                url:
                  type: string
                  format: uri
                  description: URL to Convert
                landscape:
                  type: boolean
                  default: false
                  description: Landscape Orientation
                paper_size:
                  type: string
                  enum:
                  - A4
                  - A3
                  - Letter
                  - Legal
                  - Tabloid
                  - Custom
                  default: A4
                  description: Paper Size
                paper_width:
                  type: number
                  minimum: 0
                  multipleOf: 0.1
                  description: Paper Width (inch/mm)
                paper_height:
                  type: number
                  minimum: 0
                  multipleOf: 0.1
                  description: Paper Height (inch/mm)
                margin_top:
                  type: number
                  minimum: 0
                  multipleOf: 0.1
                  default: 1
                  description: Top Margin
                margin_bottom:
                  type: number
                  minimum: 0
                  multipleOf: 0.1
                  default: 1
                  description: Bottom Margin
                margin_left:
                  type: number
                  minimum: 0
                  multipleOf: 0.1
                  default: 1
                  description: Left Margin
                margin_right:
                  type: number
                  minimum: 0
                  multipleOf: 0.1
                  default: 1
                  description: Right Margin
                header_html:
                  type: string
                  description: Header HTML (optional)
                footer_html:
                  type: string
                  description: Footer HTML (optional)
                file:
                  $ref: '#/components/schemas/FileUpload'
                prompt:
                  type: string
                  description: Text prompt for AI generation
              required:
              - content_type
              - html_content
              - url
              - landscape
              - paper_size
              - paper_width
              - paper_height
              - margin_top
              - margin_bottom
              - margin_left
              - margin_right
              - header_html
              - footer_html
              - file
              - prompt
      responses:
        '200':
          description: Processed pdf file
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
                description: Processed pdf file
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: File too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded or insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/media/v1/pdf/mdconvert:
    post:
      operationId: pdf_mdconvert
      summary: Convert to Markdown
      description: 'Convert PDF, Word, PowerPoint, Excel, HTML, or Text files to clean Markdown format


        **Cost:** 1 credits'
      tags:
      - PDF
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  $ref: '#/components/schemas/FileUpload'
              required:
              - file
      responses:
        '200':
          description: Processed text file
          content:
            application/json:
              schema:
                type: string
                format: binary
                description: Processed text file
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: File too large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded or insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    FileUpload:
      type: string
      format: binary
      description: File to upload
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
      - error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: mt_<api-key> | supabase-jwt
      description: 'Pass either an mt_-prefixed API key or a Supabase session JWT as the Bearer token. Example: `Authorization: Bearer mt_abc123...`'