Heista Files API

Upload PDF/DOCX/TXT/MD files for use in PowerSource docs mode.

GitHub OpenAPI

Operations 2

POST /files Upload a file #
GET /files List files #

Specifications

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/heista-co:heista-co-files-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

heista-co-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Heista Files API
  version: 1.0.0
  description: 'Creative intelligence as an API. Decode any video ad, extract brand intelligence from any URL or document, generate scripts in any brand''s voice, and browse the decoded corpus for free.


    ## Surfaces

    - **Decode** — turn any video ad URL into a structural formula. Beats, hooks, psychology, visual playbook.

    - **PowerSource** — 14-section brand intelligence from a URL, internal documents, or both.

    - **Adscript** — generate 1–5 ad scripts from a proven structure + a PowerSource. Token-metered.

    - **Files** — upload PDF/DOCX/TXT/MD for use in PowerSource docs mode.

    - **Intelligence reads** — free corpus access (hook patterns, ad formulas, decoded ads).

    - **Account** — credit balance, monthly usage, pricing.


    ## Pricing

    - Decode: **$0.15** (≤60s) / **$0.20** (61–120s)

    - PowerSource: **$1.00** (URL or docs only) / **$2.00** (URL + docs)

    - Adscript: **token-metered**, typically **$0.02–$0.05** per script

    - Intelligence reads, Files API: **free**

    - Failed jobs auto-refund. Duplicate inputs (same org) return cached results at no charge.


    ## Authentication

    Bearer header on every request:

    ```

    Authorization: Bearer hst_live_your_key

    ```

    Production keys are prefixed `hst_live_`; test keys are `hst_test_`. Get yours at heista.co/api-console.


    ## Errors

    All errors follow RFC 9457 Problem Details. The same envelope shape across every endpoint; see the `ProblemDetails` schema.


    Spending-cap and circuit-breaker errors include a `reason` field (`cap_hourly`, `cap_daily`, `cap_monthly`, `cap_key_daily`, `cap_key_monthly`, `circuit_open`). Insufficient-credits errors include `top_up_url`, `current_balance`, and `required` extensions.


    ## Rate limits

    Per API key, per endpoint group. Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` (epoch ms). On 429 you also get `Retry-After` (seconds).'
  contact:
    name: Heista Support
    email: support@heista.co
    url: https://heista.co
  termsOfService: https://heista.co/terms
  license:
    name: Proprietary
    url: https://heista.co/terms
servers:
- url: https://www.heista.co/api/v1
  description: Production
- url: http://localhost:3000/api/v1
  description: Local development
security:
- bearerAuth: []
tags:
- name: Files
  description: Upload PDF/DOCX/TXT/MD files for use in PowerSource docs mode.
paths:
  /files:
    post:
      tags:
      - Files
      summary: Upload a file
      description: 'Multipart upload or JSON+base64. Accepted types: PDF, DOCX, DOC, TXT, MD. Max 10MB per file. Files expire 30 days after upload.


        Use the returned `id` in PowerSource `file_ids[]`.'
      operationId: uploadFile
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
              required:
              - file
          application/json:
            schema:
              $ref: '#/components/schemas/InlineFileUpload'
      responses:
        '201':
          description: File created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicFile'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
    get:
      tags:
      - Files
      summary: List files
      operationId: listFiles
      parameters:
      - name: limit
        in: query
        schema:
          type: integer
          default: 50
          minimum: 1
          maximum: 100
      responses:
        '200':
          description: List of files
          content:
            application/json:
              schema:
                type: object
                properties:
                  files:
                    type: array
                    items:
                      $ref: '#/components/schemas/PublicFile'
                  count:
                    type: integer
components:
  schemas:
    InlineFileUpload:
      type: object
      required:
      - filename
      - content_base64
      properties:
        filename:
          type: string
          maxLength: 256
        content_base64:
          type: string
        mime_type:
          type: string
          maxLength: 128
    ProblemDetails:
      type: object
      description: RFC 9457 Problem Details envelope used for every error.
      required:
      - type
      - title
      - status
      properties:
        type:
          type: string
          format: uri
          example: https://api.heista.co/errors/validation-error
        title:
          type: string
          example: Validation error
        status:
          type: integer
          example: 400
        detail:
          type: string
        instance:
          type: string
          format: uri
        request_id:
          type: string
          example: req_a1b2c3d4
    PublicFile:
      type: object
      properties:
        id:
          type: string
          format: uuid
        filename:
          type: string
        mime_type:
          type: string
        size_bytes:
          type: integer
        expires_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
  responses:
    ValidationError:
      description: Request validation failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
    RateLimited:
      description: Rate limit exceeded. Includes `Retry-After` (seconds).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetails'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: hst_live_xxx (production) or hst_test_xxx (test)
      description: API key issued at heista.co/api-console.