Rokha Runtime API

Run a skill for real. 5 runs a day free signed in, then a run pack or the Lab. Model steps on your own key.

GitHub OpenAPI

Operations 2

POST /api/runtime/run Run for real (signed in, daily runs) #
GET /api/runtime/runs/{run_id}/progress Live run progress #

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/rokha-ai:rokha-ai-runtime-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

rokha-ai-runtime-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    name: Rokha
    url: https://rokha.ai
  description: 'The public API of Rokha, the Agent Lab. Build a tool,

    run it for real with a trace, sell it or hire it out. Agents use the same

    doors over MCP at `/mcp/jsonrpc`. Versioning: `GET /api/schema/version`.'
  license:
    name: MIT
    url: https://github.com/rokha-ai/rokha-sdk/blob/main/LICENSE
  title: Rokha Public Runtime API
  version: 1.0.0
servers:
- description: Local development (default Erebus port)
  url: http://localhost:3000
- description: Production (hosted Erebus)
  url: https://erebus.rokha.ai
security: []
tags:
- description: Run a skill for real. 5 runs a day free signed in, then a run pack or the Lab. Model steps on your own key.
  name: Runtime
paths:
  /api/runtime/run:
    post:
      description: 'The authenticated run door — the run draws from the account''s daily

        runs (5 on a free account, then its run packs; 300 with the Lab),

        still under the global token ceiling. A step that runs no model (a

        scripted skill) needs no model key; a step that runs the model needs

        your own. Owner is derived from the verified JWT. Writes a trace

        anchored to `harness_id`.'
      operationId: runtimeRun
      requestBody:
        content:
          application/json:
            schema:
              properties:
                harness_id:
                  format: uuid
                  type: string
                instruction:
                  type: string
                model:
                  type: string
                params:
                  additionalProperties: true
                  type: object
                skill_provider:
                  type: string
                skill_slug:
                  type: string
              required:
              - skill_provider
              - skill_slug
              - harness_id
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
          description: Run acknowledgement (carries a run_id to poll)
        '401':
          description: Not authenticated
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BudgetRefusal'
          description: '`free_runs_spent` · `free_runs_ceiling` (with `ladder`) · `budget_unavailable` — `BudgetRefusal` with `error: quota`'
      security:
      - bearerAuth: []
      summary: Run for real (signed in, daily runs)
      tags:
      - Runtime
  /api/runtime/runs/{run_id}/progress:
    get:
      description: Poll a run's live stage events by run id (run-token gated server-side).
      operationId: runtimeProgress
      parameters:
      - in: path
        name: run_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
          description: Progress snapshot
      summary: Live run progress
      tags:
      - Runtime
components:
  schemas:
    RunLadder:
      description: 'The three rungs as data: free (signed in), a run pack, the Lab.'
      properties:
        free:
          properties:
            models:
              description: Model steps on your own model key; tool steps on Rokha's sandbox
              type: string
            resets:
              example: 00:00 UTC
              type: string
            runs_per_day:
              example: 5
              type: integer
            who:
              description: A signed-in account; anonymous callers run nothing
              type: string
          type: object
        lab:
          properties:
            gives:
              type: string
            hold_rokha:
              example: 1000000
              type: integer
            month_usd:
              example: 29.99
              type: number
            no_refunds:
              const: true
              type: boolean
            start:
              description: 'MCP subscribe {rail: usdc | sol | rokha | card, payer_wallet}'
              type: string
          type: object
        run_pack:
          $ref: '#/components/schemas/RunPack'
      type: object
    RunPack:
      description: The House run pack — pay per run after the free day. Live values; never hardcode the id.
      properties:
        buy:
          type: string
        no_refunds:
          const: true
          type: boolean
        per_run:
          example: $0.01
          type: string
        price:
          example: $1
          type: string
        price_cents:
          example: 100
          type: integer
        product_id:
          description: Buy with POST /api/products/{product_id}/checkout (MCP product_checkout); null until this deployment has read it — then GET /api/products?kind=runs&ref=rokha-runs
          format: uuid
          type:
          - string
          - 'null'
        rails:
          items:
            enum:
            - x402
            - usdc
            - sol
            - rokha
            - signet
            - card
            type: string
          type: array
        runs:
          example: 100
          type: integer
        spent:
          description: One run at a time, after the day's free runs
          type: string
      type: object
    BudgetRefusal:
      description: '429 from a run door. `code`: `sign_in_required` (anonymous — sign in with a wallet: auth_wallet_challenge → auth_wallet_verify), `free_runs_spent` (this account''s free runs are used and no run pack is left), `free_runs_ceiling` (today''s free runs are used for everyone; paid runs keep going), `budget_unavailable` (the budget could not be read — refused, try again). `ladder` rides `free_runs_spent` and `free_runs_ceiling`: buy the run pack or start the Lab, then call again.'
      properties:
        code:
          enum:
          - sign_in_required
          - free_runs_spent
          - free_runs_ceiling
          - budget_unavailable
          - runtime_ceiling
          - house_budget_spent
          type: string
        error:
          description: '`quota` on POST /api/runtime/run, `budget` elsewhere'
          enum:
          - budget
          - quota
          type: string
        ladder:
          $ref: '#/components/schemas/RunLadder'
        message:
          type: string
        ok:
          const: false
          description: Present on POST /api/rigs/run
          type: boolean
        relay:
          additionalProperties: true
          type: object
        upgrade:
          example: /pricing
          type: string
      required:
      - error
      - code
      - message
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: 'JWT issued by `/api/wallets/verify` (after `/api/wallets/challenge`),

        or `/api/auth/google/callback`. Send as

        `Authorization: Bearer <token>`. Refresh via `/api/auth/refresh`

        before expiry (24h default).

        '
      scheme: bearer
      type: http