Runtime Keys API

The keys API from Runtime, for keys.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

GET /v2/keys Lists the organization's live keys, newest first, without their secrets: every… #
POST /v2/keys Makes a key that acts as the caller, or as one of the organization's agents for… #
POST /v2/keys/{id}:update Renames a key, or sets or removes its caps (`maxCost`, `spendCap`); its secret… #
DELETE /v2/keys/{id} Revokes a key: refused from its next call, with the hand-off tokens made from… #

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/withruntime-com:withruntime-com-keys-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

withruntime-com-keys-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Runtime API v2 Keys API
  version: '2026-10-27'
servers:
- url: https://api.withruntime.com
security:
- bearer: []
tags:
- name: Keys
paths:
  /v2/keys:
    get:
      operationId: keys.list
      summary: 'Lists the organization''s live keys, newest first, without their secrets: every…'
      tags:
      - Keys
      x-action: keys:list
      parameters:
      - name: cursor
        in: query
        required: false
        description: 'Where the page starts: a page''s `next`.'
        schema:
          type: string
      - name: limit
        in: query
        required: false
        description: The most items the page holds.
        schema:
          type: integer
          default: 50
          minimum: 1
          maximum: 200
      responses:
        '400':
          description: 'An error: invalid_request.'
          x-error-codes:
          - invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'An error: unauthorized.'
          x-error-codes:
          - unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'An error: forbidden.'
          x-error-codes:
          - forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'An error: rate_limited.'
          x-error-codes:
          - rate_limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'An error: internal.'
          x-error-codes:
          - internal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: 'An error: unavailable.'
          x-error-codes:
          - unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: A page of Key.
          content:
            application/json:
              schema:
                type: object
                required:
                - items
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Key'
                  next:
                    type: string
                    description: Where the next page starts, as the next call's cursor; none on the last page.
      x-mcp-tool: runtime_keys_list
      x-idempotent: true
    post:
      operationId: keys.create
      summary: Makes a key that acts as the caller, or as one of the organization's agents for…
      tags:
      - Keys
      x-action: keys:create
      parameters: []
      responses:
        '400':
          description: 'An error: invalid_request.'
          x-error-codes:
          - invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'An error: unauthorized.'
          x-error-codes:
          - unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'An error: forbidden, limit_exceeded.'
          x-error-codes:
          - forbidden
          - limit_exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: 'An error: already_exists, conflict.'
          x-error-codes:
          - already_exists
          - conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'An error: rate_limited.'
          x-error-codes:
          - rate_limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'An error: internal.'
          x-error-codes:
          - internal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: 'An error: unavailable, capacity_unavailable.'
          x-error-codes:
          - unavailable
          - capacity_unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: 'A key just made, with its secret: shown this once, never again.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyCreated'
      x-mcp-tool: runtime_keys_create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyCreate'
  /v2/keys/{id}:update:
    post:
      operationId: keys.update
      summary: Renames a key, or sets or removes its caps (`maxCost`, `spendCap`); its secret…
      tags:
      - Keys
      x-action: keys:update
      parameters:
      - name: id
        in: path
        required: true
        description: Its ID.
        schema:
          type: string
      responses:
        '400':
          description: 'An error: invalid_request.'
          x-error-codes:
          - invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'An error: unauthorized.'
          x-error-codes:
          - unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'An error: forbidden.'
          x-error-codes:
          - forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'An error: not_found.'
          x-error-codes:
          - not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: 'An error: conflict.'
          x-error-codes:
          - conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'An error: rate_limited.'
          x-error-codes:
          - rate_limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'An error: internal.'
          x-error-codes:
          - internal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: 'An error: unavailable.'
          x-error-codes:
          - unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: An API key, without its secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Key'
      x-mcp-tool: runtime_keys_update
      x-idempotent: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeyUpdate'
  /v2/keys/{id}:
    delete:
      operationId: keys.delete
      summary: 'Revokes a key: refused from its next call, with the hand-off tokens made from…'
      tags:
      - Keys
      x-action: keys:delete
      parameters:
      - name: id
        in: path
        required: true
        description: Its ID.
        schema:
          type: string
      responses:
        '400':
          description: 'An error: invalid_request.'
          x-error-codes:
          - invalid_request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'An error: unauthorized.'
          x-error-codes:
          - unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 'An error: forbidden.'
          x-error-codes:
          - forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 'An error: not_found.'
          x-error-codes:
          - not_found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: 'An error: conflict.'
          x-error-codes:
          - conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'An error: rate_limited.'
          x-error-codes:
          - rate_limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 'An error: internal.'
          x-error-codes:
          - internal
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: 'An error: unavailable.'
          x-error-codes:
          - unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: An API key, without its secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Key'
      x-mcp-tool: runtime_keys_delete
      x-idempotent: true
components:
  schemas:
    KeyAuthorization:
      type: object
      description: An OAuth client's request for a key, as `/v2/oauth/authorize` received it.
      properties:
        clientId:
          type: string
          description: The client's `client_id`.
        redirectUri:
          type: string
          description: 'Where the client is sent back: one of its redirect URIs.'
        codeChallenge:
          type: string
          description: Its S256 `code_challenge`.
        state:
          type: string
          description: Its `state`, sent back unchanged.
      required:
      - clientId
      - redirectUri
      - codeChallenge
    Key:
      type: object
      description: An API key, without its secret.
      properties:
        id:
          type: string
          description: Its ID.
        object:
          type: string
          enum:
          - key
          description: Always `key`.
        name:
          type: string
          description: Its name, as its maker gave it.
        state:
          type: string
          enum:
          - active
          - deleted
          description: '`active` while it works; `deleted` once revoked: a delete''s answer.'
        accountId:
          type: string
          description: The person it acts as or for.
        agentId:
          type: string
          description: The agent or CI pipeline it acts as.
        projectId:
          type: string
          description: The one project it acts in; every project its holder reaches when omitted.
        createdAt:
          type: string
          format: date-time
          description: When it was made.
        expiresAt:
          type: string
          format: date-time
          description: When it stops working; never when omitted.
        lastUsedAt:
          type: string
          format: date-time
          description: When it was last used.
        maxCost:
          type: string
          format: decimal
          pattern: ^(0|[1-9][0-9]{0,11})(\.[0-9]{1,9})?$
          description: The most one request made with it commits, in US dollars.
        spendCap:
          type: string
          format: decimal
          pattern: ^(0|[1-9][0-9]{0,11})(\.[0-9]{1,9})?$
          description: The most the machines made with it, with those of every key made with it, may spend over spendCapWindowSeconds, in US dollars.
        spendCapWindowSeconds:
          type: integer
          description: The rolling window spendCap counts over, in seconds.
        spent:
          type: string
          format: decimal
          pattern: ^(0|[1-9][0-9]{0,11})(\.[0-9]{1,9})?$
          description: 'What it spent over spendCapWindowSeconds (the last 24 hours when it has no spendCap), in US dollars, as spendCap counts it: its machines'' and those of every key made with it. Listed and updated keys only.'
        deletedAt:
          type: string
          format: date-time
          description: 'When it was revoked: a delete''s answer, its state `deleted`.'
      required:
      - id
      - object
      - name
      - state
      - createdAt
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          - requestId
          - hint
          - retryable
          properties:
            code:
              type: string
              enum:
              - invalid_request
              - unauthorized
              - payment_required
              - card_required
              - forbidden
              - limit_exceeded
              - not_found
              - method_not_allowed
              - already_exists
              - conflict
              - too_large
              - rate_limited
              - internal
              - not_implemented
              - unavailable
              - capacity_unavailable
              - timeout
            message:
              type: string
            requestId:
              type: string
              description: The answer's request-id header.
            hint:
              type: string
              description: What to do about it.
            retryable:
              type: boolean
              description: 'The same request, sent again after Retry-After, may pass: nothing was done.'
            param:
              type: string
              description: The request's field it is about.
            details:
              type: object
              description: Its case (`reason`) and the facts of it.
              properties:
                reason:
                  type: string
                  enum:
                  - invalid_request
                  - invalid_code
                  - invalid_network_rule
                  - system_label
                  - invalid_archive
                  - archive_failed
                  - not_a_directory
                  - is_a_directory
                  - exec_format_error
                  - limit_above_org
                  - unauthorized
                  - forbidden
                  - payment_required
                  - card_required
                  - card_declined
                  - public_preview_not_allowed
                  - permission_denied
                  - org_closing
                  - limit_not_set
                  - not_found
                  - route_not_found
                  - method_not_allowed
                  - image_not_found
                  - file_not_found
                  - cwd_not_found
                  - program_not_found
                  - process_not_found
                  - upload_not_found
                  - length_required
                  - already_exists
                  - name_taken
                  - conflict
                  - image_in_use
                  - not_supported
                  - precondition_failed
                  - sandbox_paused
                  - delete_protected
                  - confirmation_required
                  - idempotency_key_reused
                  - version_conflict
                  - upload_running
                  - upload_incomplete
                  - checksum_mismatch
                  - blobs_missing
                  - file_changed
                  - display_not_running
                  - browser_not_running
                  - kernel_not_installed
                  - act_failed
                  - root_unavailable
                  - image_lost
                  - archive_unavailable
                  - directory_not_empty
                  - stdin_closed
                  - stdin_busy
                  - fork_unsafe
                  - card_on_file
                  - no_card
                  - not_test_mode
                  - too_large
                  - file_too_large
                  - limit_exceeded
                  - quota_exceeded
                  - blob_store_full
                  - process_limit
                  - disk_full
                  - rate_limited
                  - transfer_limit
                  - internal
                  - sandbox_failed
                  - not_implemented
                  - previews_unavailable
                  - unavailable
                  - run_goes_on
                  - machine_restarting
                  - sign_in_unavailable
                  - secrets_unavailable
                  - billing_unavailable
                  - capacity_unavailable
                  - timeout
    KeyCreated:
      type: object
      description: 'A key just made, with its secret: shown this once, never again.'
      properties:
        id:
          type: string
          description: Its ID.
        object:
          type: string
          enum:
          - key
          description: Always `key`.
        name:
          type: string
          description: Its name, as its maker gave it.
        state:
          type: string
          enum:
          - active
          - deleted
          description: '`active` while it works; `deleted` once revoked: a delete''s answer.'
        accountId:
          type: string
          description: The person it acts as or for.
        agentId:
          type: string
          description: The agent or CI pipeline it acts as.
        projectId:
          type: string
          description: The one project it acts in; every project its holder reaches when omitted.
        createdAt:
          type: string
          format: date-time
          description: When it was made.
        expiresAt:
          type: string
          format: date-time
          description: When it stops working; never when omitted.
        lastUsedAt:
          type: string
          format: date-time
          description: When it was last used.
        maxCost:
          type: string
          format: decimal
          pattern: ^(0|[1-9][0-9]{0,11})(\.[0-9]{1,9})?$
          description: The most one request made with it commits, in US dollars.
        spendCap:
          type: string
          format: decimal
          pattern: ^(0|[1-9][0-9]{0,11})(\.[0-9]{1,9})?$
          description: The most the machines made with it, with those of every key made with it, may spend over spendCapWindowSeconds, in US dollars.
        spendCapWindowSeconds:
          type: integer
          description: The rolling window spendCap counts over, in seconds.
        spent:
          type: string
          format: decimal
          pattern: ^(0|[1-9][0-9]{0,11})(\.[0-9]{1,9})?$
          description: 'What it spent over spendCapWindowSeconds (the last 24 hours when it has no spendCap), in US dollars, as spendCap counts it: its machines'' and those of every key made with it. Listed and updated keys only.'
        deletedAt:
          type: string
          format: date-time
          description: 'When it was revoked: a delete''s answer, its state `deleted`.'
        secret:
          type: string
          description: 'The key itself, to send as `Authorization: Bearer <secret>`; omitted for a key a device or an OAuth client collects.'
        redirectTo:
          type: string
          description: 'For an OAuth client''s key: where to send the person, with the code the client exchanges for it.'
      required:
      - id
      - object
      - name
      - state
      - createdAt
    KeyUpdate:
      type: object
      description: 'A change to a key: each field left out stays as it is.'
      properties:
        name:
          type: string
          description: Its name.
          minLength: 1
          maxLength: 64
        maxCost:
          type: string
          format: decimal
          pattern: ^(0|[1-9][0-9]{0,11})(\.[0-9]{1,9})?$
          description: 'The most one request made with it may commit, in US dollars (`"5.00"`). Never more than a key it was made with, nor than the key that changes it: a key never raises its own caps.'
        spendCap:
          type: string
          format: decimal
          pattern: ^(0|[1-9][0-9]{0,11})(\.[0-9]{1,9})?$
          description: The most the machines made with it, with those of every key made with it, may spend over spendCapWindowSeconds, in US dollars, as billed. Never more than a key it was made with, nor than the key that changes it.
        spendCapWindowSeconds:
          type: integer
          description: The rolling window spendCap counts over, in seconds; kept when omitted, a day for a key that had no spendCap.
          minimum: 60
          maximum: 2592000
        remove:
          type: array
          items:
            type: string
            enum:
            - maxCost
            - spendCap
          description: 'Caps to remove: `maxCost`, `spendCap`. The key is then held only by the caps of the keys it was made with and of its holder''s grants.'
    KeyCreate:
      type: object
      description: A key to make.
      properties:
        name:
          type: string
          description: Its name.
          minLength: 1
          maxLength: 64
        projectId:
          type: string
          description: Held to this one project (Growth and up); every project its holder reaches when omitted.
        agentId:
          type: string
          description: One of the organization's agents or CI pipelines it acts as, for the caller; the caller itself when omitted.
        actions:
          type: array
          items:
            type: string
          description: 'The actions it holds, each `product:action` as each call''s reference page names it (`sandboxes:create`, `sandboxes:exec`), on every plan: it acts as an agent of its own granted exactly these, never more than its caller may do or spend, in every project its caller reaches (one held to one project, with projectId or by a caller that reaches one alone, starts at Growth), and its agent and role are deleted with it. Omitted, it holds every action its holder''s grant allows, or, made with a key that has actions, those actions. Not with agentId.'
        expiresInSeconds:
          type: integer
          description: Seconds until it stops working; never when omitted.
          minimum: 60
          maximum: 31536000
        maxCost:
          type: string
          format: decimal
          pattern: ^(0|[1-9][0-9]{0,11})(\.[0-9]{1,9})?$
          description: 'The most one request made with it may commit, in US dollars (`"5.00"`): one asking more is refused 403, and a create that names no maxCost gets this one. Made with a key that has one, at most that key''s.'
        spendCap:
          type: string
          format: decimal
          pattern: ^(0|[1-9][0-9]{0,11})(\.[0-9]{1,9})?$
          description: 'The most the machines made with it, with those of every key made with it, may spend over spendCapWindowSeconds, in US dollars, as billed: once reached, a create is refused 403 until the window passes it, and a create that names no maxCost gets what is left as its maxCost. Running machines may pass it. Made with a key that has one, at most that key''s, and counted in it too.'
        spendCapWindowSeconds:
          type: integer
          description: The rolling window spendCap counts over, in seconds; a day when omitted.
          minimum: 60
          maximum: 2592000
        userCode:
          type: string
          description: 'The code a device shows (OAuth 2.0 device flow, RFC 8628): the key goes to that device, never in this answer.'
        authorization:
          $ref: '#/components/schemas/KeyAuthorization'
      required:
      - name
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
x-shortcuts:
- name: run
  description: Runs a command in a new sandbox and deletes the sandbox after, whether the command succeeded or not. Returns the command's result.
  inputSchema:
    type: object
    properties:
      cmd:
        oneOf:
        - type: string
          minLength: 1
          description: Run by bash -lc.
        - type: array
          items:
            type: string
          minItems: 1
          description: The program and its arguments, run without a shell.
        description: 'The command: text is run by `bash -lc`; a list is the program and its arguments, run without a shell.'
      image:
        type: string
        description: The image it boots, by name or ID; Runtime's default image when omitted.
      vcpu:
        type: integer
        description: Its vCPUs; 2 when omitted.
      memoryGB:
        type: number
        description: Its memory in GB (1 GB is 1,024 MiB); 4 when omitted.
      cwd:
        type: string
        description: The directory it runs in; the user's home when omitted.
      env:
        type: object
        additionalProperties:
          type: string
        description: Environment variables to add.
      stdin:
        type: string
        contentEncoding: base64
        description: Bytes sent to its standard input.
      timeoutSeconds:
        type: number
        description: Seconds it may run before it is stopped; it runs to its end when omitted.
    required:
    - cmd
  steps:
  - verb: sandboxes.create
    args:
      image:
        arg: image
      vcpu:
        arg: vcpu
      memoryGB:
        arg: memoryGB
    always: false
  - verb: sandboxes.exec
    args:
      id:
        step: 0
        field: id
      cmd:
        arg: cmd
      cwd:
        arg: cwd
      env:
        arg: env
      stdin:
        arg: stdin
      timeoutSeconds:
        arg: timeoutSeconds
    always: false
  - verb: sandboxes.delete
    args:
      id:
        step: 0
        field: id
    always: true
  answer: 1