PennyCompute Instances API

Your own container image, started by name, reached over HTTP and billed by the running second. Not offered at present: a start answers 409 no_capacity.

GitHub OpenAPI

Operations 6

POST /v1/instances Start an instance by name #
GET /v1/instances List instances #
GET /v1/instances/usage Read usage and charges by label #
POST /v1/instances/destroy Destroy the instance with a name #
GET /v1/instances/{id} Read state, running seconds and the charge so far #
POST /v1/instances/{id}/destroy Destroy an instance #

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/pennycompute-com:pennycompute-com-instances-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

pennycompute-com-instances-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: PennyCompute buyer Instances API
  version: 1.10.2
  description: 'Media jobs over HTTP: video generation with MiniMax H3, FFmpeg work (transcode, stitch, sound mix, captions, timeline exports, frame images and sound files), media measurement and Remotion renders. Create a server API key in the dashboard at https://app.pennycompute.com and send it on every call as Authorization: Bearer . Submit a job to POST /v1/jobs with a service_id and its input, read GET /v1/jobs/{id} until its status is final or register a webhook endpoint, then fetch the file from the link GET /v1/jobs/{id}/output returns. Media goes in by public link; POST /v1/assets hosts one source file or a complete Remotion bundle. h3.video.v1 is text to video with optional first and last frames or reference files; h3.reference_480p.v1 is the earlier one-image preset, kept for existing integrations. Bodies are JSON, up to 2 MB. Amounts are strings in millionths of one US dollar. Each API key may send 600 requests a minute. A request over the limit receives HTTP 429 with the error rate_limited and a Retry-After header in seconds. Job submissions, estimates and capacity reads are each limited to 120 a minute for a key and answer 429 past that. Guides are at https://pennycompute.com/docs, the reference at https://pennycompute.com/docs/api and the dated list of changes at https://pennycompute.com/docs/changes.'
servers:
- url: https://api.pennycompute.com
security:
- buyerKey: []
tags:
- name: Instances
  description: 'Your own container image, started by name, reached over HTTP and billed by the running second. Not offered at present: a start answers 409 no_capacity.'
paths:
  /v1/instances:
    post:
      operationId: startInstance
      tags:
      - Instances
      summary: Start an instance by name
      description: 'Answers at once: started, or refused with a reason. There is no queue. 201 is a new instance; 200 is the instance already starting or running under this name, returned whatever the body asks for. Any other answer means no instance is left running by this call.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstanceStart'
      responses:
        '200':
          description: The instance already running under this name
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Instance'
        '201':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Instance'
        '409':
          description: 'Refused. No instance was started and nothing is charged. no_capacity: no machine is free for this size now. image_not_held: no machine holds the image yet. account: the balance is empty or an amount is due. instance_limit: your running instances are at your limit.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - no_capacity
                    - image_not_held
                    - account
                    - instance_limit
                required:
                - error
        '503':
          description: Instances cannot be started now. No instance was started.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                    - instances_unavailable
                required:
                - error
        default:
          description: Request error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
    get:
      operationId: listInstances
      tags:
      - Instances
      summary: List instances
      description: 'Newest first. With from and to, the instances that ran in that time: usage per instance.'
      parameters:
      - name: state
        in: query
        schema:
          type: string
          enum:
          - starting
          - running
          - stopped
          - crashed
          - lost
      - name: label
        in: query
        schema:
          type: string
      - name: name
        in: query
        schema:
          type: string
        description: The current or most recent instance with this name.
      - name: from
        in: query
        schema:
          type: string
          format: date-time
        description: Instances that ran at or after this time.
      - name: to
        in: query
        schema:
          type: string
          format: date-time
        description: Instances that ran before this time.
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 50
      - name: cursor
        in: query
        schema:
          type: string
        description: next_cursor from the previous page.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  instances:
                    type: array
                    items:
                      $ref: '#/components/schemas/Instance'
                  next_cursor:
                    type:
                    - string
                    - 'null'
                required:
                - instances
                - next_cursor
        default:
          description: Request error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
  /v1/instances/usage:
    get:
      operationId: getInstanceUsage
      tags:
      - Instances
      summary: Read usage and charges by label
      description: Running seconds and charges of the instances that ended in a time range, totalled per label.
      parameters:
      - name: from
        in: query
        schema:
          type: string
          format: date-time
      - name: to
        in: query
        schema:
          type: string
          format: date-time
      - name: label
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  from:
                    type: string
                    format: date-time
                  to:
                    type: string
                    format: date-time
                  usage:
                    type: array
                    items:
                      type: object
                      properties:
                        label:
                          type:
                          - string
                          - 'null'
                        instances:
                          type: integer
                        running_seconds:
                          type: integer
                        charge_micros:
                          type: string
                          pattern: ^[0-9]+$
                          description: Millionths of one US dollar
                      required:
                      - label
                      - charge_micros
                  total_charge_micros:
                    type: string
                    pattern: ^[0-9]+$
                    description: Millionths of one US dollar
                required:
                - usage
                - total_charge_micros
        default:
          description: Request error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
  /v1/instances/destroy:
    post:
      operationId: destroyInstanceNamed
      tags:
      - Instances
      summary: Destroy the instance with a name
      description: For a caller that knows only the name, such as one that abandoned a start. Takes effect at once.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
              required:
              - name
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  destroyed:
                    type: boolean
                  instance:
                    $ref: '#/components/schemas/Instance'
                required:
                - destroyed
        default:
          description: Request error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
  /v1/instances/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: getInstance
      tags:
      - Instances
      summary: Read state, running seconds and the charge so far
      description: The token is not returned here.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Instance'
        default:
          description: Request error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
  /v1/instances/{id}/destroy:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
    post:
      operationId: destroyInstance
      tags:
      - Instances
      summary: Destroy an instance
      description: 'Takes effect at once: the address stops answering and billing stops. Repeating it is harmless.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: {}
              required: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Instance'
        default:
          description: Request error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                - error
components:
  schemas:
    Instance:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        state:
          type: string
          enum:
          - starting
          - running
          - stopped
          - crashed
          - lost
          description: 'starting: placed, not yet answering. running: answering. stopped: ended on purpose; see end_reason. crashed: the container exited. lost: its machine went away.'
        end_reason:
          type: string
          enum:
          - idle
          - destroyed
          - lifetime
          - exited
          - disk
          description: 'Why it ended. stopped: idle, destroyed or lifetime. crashed: exited (the process ended) or disk (it outgrew disk_gb).'
        exit_code:
          type: integer
          description: The exit code of a crashed container, when known.
        address:
          type: string
          format: uri
          description: 'Send HTTP here with the header Authorization: Bearer <token>. Any method and path; bodies are streamed both ways; one request may stay open 15 minutes. WebSocket upgrades are not carried. Have your container send Content-Length on a reply whose completeness matters, or check the size or framing of what you receive: when an instance ends or its machine goes away in the middle of a reply, a reply without Content-Length ends at the caller as a complete 200 with fewer bytes, and one with Content-Length fails as a broken transfer. Keep connections open in your server (the default in Node, Go and uvicorn): a server that closes its connection after every reply can lose the end of a reply larger than about a megabyte. An answer from PennyCompute rather than from your container carries the header pennycompute-instance with the instance state and a JSON error: 401 invalid_token, 410 instance_gone once the instance has ended, 503 instance_starting when the port has not opened within 30 seconds of the request arriving (a request sent while the instance is starting is held and forwarded when it is ready), 502 instance_unreachable when the container refuses the connection.'
        max_request_body_bytes:
          type: integer
          description: The largest single request body this instance can receive. Replies are not limited.
        token:
          type: string
          description: Bearer token for the instance address. Returned by a start only.
        image:
          type: string
          pattern: ^sha256:[0-9a-f]{64}$
          description: The image digest, as printed by the push to your registry.
        label:
          type: string
        vcpu:
          type: number
          minimum: 0.25
          maximum: 16
          multipleOf: 0.25
          description: Cores reserved and billed, in quarters. The container sees the next whole number of cores.
        memory_mib:
          type: integer
          minimum: 256
          maximum: 65536
        disk_gb:
          type: integer
          minimum: 1
          maximum: 100
          default: 8
        port:
          type: integer
        idle_stop_seconds:
          type: integer
        max_lifetime_seconds:
          type: integer
        rate_nanos_per_second:
          type: integer
          description: 'The price of this instance in billionths of a US dollar per running second: 16000 per vCPU, 2000 per GiB of memory, 50 per GB of disk.'
        created_at:
          type: string
          format: date-time
        started_at:
          type: string
          format: date-time
        ended_at:
          type: string
          format: date-time
        running_seconds:
          type: integer
          description: Whole seconds from answering to stopping, so far.
        charge_micros:
          type: string
          pattern: ^[0-9]+$
          description: The charge so far, in millionths of a US dollar.
      required:
      - id
      - name
      - state
      - charge_micros
    InstanceStart:
      type: object
      properties:
        name:
          type: string
          pattern: ^[A-Za-z0-9._:-]{1,128}$
          description: Your name for the instance. A start with the name of an instance that is starting or running returns that instance.
        image:
          type: string
          pattern: ^sha256:[0-9a-f]{64}$
          description: The image digest, as printed by the push to your registry.
        vcpu:
          type: number
          minimum: 0.25
          maximum: 16
          multipleOf: 0.25
          description: Cores reserved and billed, in quarters. The container sees the next whole number of cores.
        memory_mib:
          type: integer
          minimum: 256
          maximum: 65536
        disk_gb:
          type: integer
          minimum: 1
          maximum: 100
          default: 8
        env:
          type: object
          additionalProperties:
            type: string
          description: Environment variables for the container. Up to 64.
        port:
          type: integer
          minimum: 1
          maximum: 65535
          default: 8080
          description: The port your container listens on. Requests to the instance address arrive there.
        idle_stop_seconds:
          type: integer
          minimum: 5
          maximum: 3600
          default: 30
          description: Stop after this long with no request open.
        max_lifetime_seconds:
          type: integer
          minimum: 60
          maximum: 86400
          default: 3600
          description: Stop this long after the start, whatever is running.
        label:
          type: string
          pattern: ^[A-Za-z0-9][A-Za-z0-9._:/-]{0,63}$
          description: Groups instances in usage.
        min_request_body_bytes:
          type: integer
          minimum: 0
          maximum: 4294967296
          default: 0
          description: The largest single request body you will send to this instance. The instance is placed where that body can be carried, or the start is refused with no_capacity. Leave it out for bodies up to 100 MB.
      required:
      - name
      - image
      - vcpu
      - memory_mib
  securitySchemes:
    buyerKey:
      type: http
      scheme: bearer
      description: 'A server API key, created in the dashboard at https://app.pennycompute.com under Server API keys. It starts with pc_live_ and is shown once, when it is created. Send it as Authorization: Bearer <key>. A key carries the scopes jobs:read and jobs:write. Submitting and cancelling jobs, preparing uploads and changing webhook endpoints need jobs:write; listing and reading jobs, usage, invoices and webhook endpoints need jobs:read. A call with no key, or with an unknown or revoked one, answers 401 unauthorized. A key without the scope answers 403 missing_scope.'