Opper AI Files API

Reusable file storage for media inputs and generated outputs

Operations 7

GET /v3/files List files #
POST /v3/files Upload a file #
GET /v3/files/usage Get storage usage #
DELETE /v3/files/{id} Delete a file #
GET /v3/files/{id} Get file metadata #
PATCH /v3/files/{id} Update a file's expiry #
GET /v3/files/{id}/content Get a file download URL #

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/opper:opper-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

opper-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: Schema-driven generative API that orchestrates LLM-powered workflows.
  title: Task Files API
  version: 3.0.0
servers:
- description: Production
  url: https://api.opper.ai
- description: Local development
  url: http://localhost:8080
security:
- BearerAuth: []
tags:
- description: Reusable file storage for media inputs and generated outputs
  name: Files
paths:
  /v3/files:
    get:
      description: List files for the project, newest first. Paginated with the shared `meta`+`data` shape. Optionally filter by `type`, `purpose`, or a `q` substring search.
      operationId: listFiles
      parameters:
      - description: Max items (default 20, max 100)
        in: query
        name: limit
        schema:
          default: 20
          type: integer
      - description: Items to skip (default 0)
        in: query
        name: offset
        schema:
          default: 0
          type: integer
      - description: Filter by media family
        in: query
        name: type
        schema:
          enum:
          - image
          - video
          - audio
          type: string
      - description: Filter by exact purpose (e.g. reference_media, generated_image)
        in: query
        name: purpose
        schema:
          type: string
      - description: Case-insensitive substring match on filename or id
        in: query
        name: q
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      properties:
                        bytes:
                          type: integer
                        created_at:
                          format: date-time
                          type: string
                        expires_at:
                          format: date-time
                          type: string
                        filename:
                          type: string
                        id:
                          description: file_… id
                          type: string
                        mime_type:
                          type: string
                        object:
                          example: file
                          type: string
                        purpose:
                          type: string
                        status:
                          type: string
                      type: object
                    type: array
                  meta:
                    properties:
                      limit:
                        type: integer
                      offset:
                        type: integer
                      total:
                        type: integer
                    type: object
                type: object
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '401':
          description: Unauthorized - missing or invalid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      summary: List files
      tags:
      - Files
    post:
      description: Upload a file (multipart/form-data) and get back a `file_`. The id can be passed as the `image`/`video`/`reference_images` source on POST /v3/videos. `purpose` defaults to `reference_media` (accepts common image/video types). The MIME type is detected from the bytes; size and per-org quota are enforced. Files are permanent until deleted; pass `ttl_seconds` to schedule an expiry.
      operationId: uploadFile
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: The file bytes.
                  format: binary
                  type: string
                filename:
                  description: Optional advisory filename (defaults to the upload's filename).
                  type: string
                purpose:
                  default: reference_media
                  description: Intended use; gates the accepted MIME types.
                  type: string
                ttl_seconds:
                  description: Optional lifetime in seconds; omit for a permanent file. Can be changed later via PATCH /v3/files/{id}.
                  type: integer
              required:
              - file
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  bytes:
                    type: integer
                  created_at:
                    format: date-time
                    type: string
                  expires_at:
                    format: date-time
                    type: string
                  filename:
                    type: string
                  id:
                    description: file_… id
                    type: string
                  mime_type:
                    type: string
                  object:
                    example: file
                    type: string
                  purpose:
                    type: string
                  status:
                    type: string
                type: object
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '401':
          description: Unauthorized - missing or invalid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      summary: Upload a file
      tags:
      - Files
  /v3/files/usage:
    get:
      description: 'Report the organization''s current file-storage usage against its quota: bytes used/limit/remaining and file count used/limit/remaining. The quota is per-organization and shared by uploads and stored generated media (image/audio/video outputs). Check this before uploading to avoid a `storage_quota_exceeded` (413). A limit of `0` means that dimension is unbounded, in which case `remaining` is omitted.'
      operationId: getFilesUsage
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  bytes_limit:
                    description: Per-org byte quota (0 = unbounded).
                    type: integer
                  bytes_remaining:
                    description: bytes_limit - bytes_used, clamped at 0 (omitted when unbounded).
                    type: integer
                  bytes_used:
                    description: Total bytes stored across the org's live files.
                    type: integer
                  file_count:
                    description: Number of the org's live files.
                    type: integer
                  file_count_limit:
                    description: Per-org file-count quota (0 = unbounded).
                    type: integer
                  file_count_remaining:
                    description: file_count_limit - file_count, clamped at 0 (omitted when unbounded).
                    type: integer
                  object:
                    example: files.usage
                    type: string
                type: object
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '401':
          description: Unauthorized - missing or invalid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      summary: Get storage usage
      tags:
      - Files
  /v3/files/{id}:
    delete:
      description: Delete a file (removes the stored bytes).
      operationId: deleteFile
      parameters:
      - description: File ID (file_…)
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  deleted:
                    type: boolean
                  id:
                    type: string
                  object:
                    type: string
                type: object
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '401':
          description: Unauthorized - missing or invalid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      summary: Delete a file
      tags:
      - Files
    get:
      description: Get a file's metadata by id.
      operationId: getFile
      parameters:
      - description: File ID (file_…)
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  bytes:
                    type: integer
                  created_at:
                    format: date-time
                    type: string
                  expires_at:
                    format: date-time
                    type: string
                  filename:
                    type: string
                  id:
                    description: file_… id
                    type: string
                  mime_type:
                    type: string
                  object:
                    example: file
                    type: string
                  purpose:
                    type: string
                  status:
                    type: string
                type: object
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '401':
          description: Unauthorized - missing or invalid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      summary: Get file metadata
      tags:
      - Files
    patch:
      description: 'Set or clear a file''s expiry. `ttl_seconds` is the only mutable field: a positive integer schedules the file to expire that many seconds from now; an explicit `null` clears a previously set expiry (files are permanent by default).'
      operationId: updateFile
      parameters:
      - description: File ID (file_…)
        in: path
        name: id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFileRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  bytes:
                    type: integer
                  created_at:
                    format: date-time
                    type: string
                  expires_at:
                    format: date-time
                    type: string
                  filename:
                    type: string
                  id:
                    description: file_… id
                    type: string
                  mime_type:
                    type: string
                  object:
                    example: file
                    type: string
                  purpose:
                    type: string
                  status:
                    type: string
                type: object
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '401':
          description: Unauthorized - missing or invalid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      summary: Update a file's expiry
      tags:
      - Files
  /v3/files/{id}/content:
    get:
      description: Returns a short-TTL presigned download URL for the file's bytes.
      operationId: getFileContent
      parameters:
      - description: File ID (file_…)
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  bytes:
                    type: integer
                  mime_type:
                    type: string
                  url:
                    description: Presigned download URL (valid ~1 hour)
                    type: string
                type: object
          description: Successful response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad request
        '401':
          description: Unauthorized - missing or invalid API key
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal server error
      summary: Get a file download URL
      tags:
      - Files
components:
  schemas:
    ErrorResponse:
      properties:
        error:
          properties:
            code:
              type: string
            details:
              description: Any value
            message:
              type: string
          required:
          - code
          - message
          type: object
        meta:
          type: object
      required:
      - error
      type: object
    UpdateFileRequest:
      properties:
        ttl_seconds:
          description: Positive integer (max 3153600000
          type: integer
      required:
      - ttl_seconds
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: API Key
      description: API key authentication. Pass your API key as a Bearer token.
      scheme: bearer
      type: http
    MCPBearer:
      description: Delegated user OAuth access token for the Opper MCP resource. Obtain through advertised OAuth authorization; runtime and management service keys are not accepted.
      scheme: bearer
      type: http
    ManagementBearer:
      bearerFormat: Management API Key
      description: Management API authentication. Pass an `op-mak-…` management token as a Bearer token. Runtime `op-…` API keys are rejected with 403 — they belong on the data-plane endpoints. Mint a management key from the platform UI under Settings → API keys.
      scheme: bearer
      type: http