Agentik Run API

The run API from Agentik — 3 operation(s) for run.

Operations 3

POST /v1/run Execute a tool and pay per call #
GET /v1/runs/{id} Status and final price of a run; settles deferred runs on demand #
POST /mcp MCP Streamable HTTP endpoint (spec 2026-07-28, 2025 clients supported) #

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/agentik-cc:agentik-cc-run-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

agentik-cc-run-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Agentik agent Run API
  version: 0.1.0
  summary: 'Pay-per-call tools for AI agents: one API key, one prepaid balance, many providers.'
  description: 'Three primitives: discover (free, public), inspect (free, public), run (API key, billed per call). Prices are the providers'' own, without markup; a platform fee applies when a human tops up the balance. A run normally reserves its maximum. Tools with pricing.costMode=actual reserve an estimate and bill the exact provider receipt without a per-call cap; additional usage may be debited. Keys with optional spending caps cannot run these tools. Unused funds are released; uncertain consumption stays reserved for reconciliation, including after a connection error. Separate executions are charged separately; idempotency keys replay an existing execution. Some tools create a live resource (browser session, agent run): the run stays RUNNING and is settled when the resource ends. MCP (Streamable HTTP) is served at https://ai.agentik.cc/mcp with the same catalog and billing; it authorizes through OAuth 2.1 (metadata at https://ai.agentik.cc/.well-known/oauth-protected-resource/mcp) or the API key. https://ai.agentik.cc/mcp/public serves discover and inspect without credentials. Inspect each tool for its complete input schema. This document covers customer integration only.'
servers:
- url: https://api.agentik.cc
security: []
tags:
- name: Run
paths:
  /v1/run:
    post:
      tags:
      - Run
      summary: Execute a tool and pay per call
      security:
      - apiKey: []
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        schema:
          type: string
        description: Replays the same run instead of paying twice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunRequest'
      responses:
        '200':
          description: 'Run outcome: COMPLETED, FAILED (confirmed consumption may be billed), or RUNNING. A failed run that delivered nothing closes at $0, even when provider consumption is unconfirmed. An uncertain job with deferred settlement retains its reservation for reconciliation.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunResult'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '400':
          description: INVALID_REQUEST, INVALID_INPUT (errors list the schema violations) or ROUTE_MAX_COST (max_cost_usd is below every provider of a routed tool; nothing ran)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '401':
          description: Missing, unknown or revoked API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '402':
          description: INSUFFICIENT_CREDITS or PAID_CREDIT_REQUIRED (video or promotional reservation cap). When purchases are available, a top-up link may be supplied for a human to complete. Otherwise payments_enabled is false. Reuse the same idempotency key after funding.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsufficientCreditsResponse'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '403':
          description: LIFETIME_CAP_EXCEEDED (optional lifetime cap), BUDGET_CAP_EXCEEDED (optional daily cap), TOOL_NOT_ALLOWED (key policy) or TOOL_CAP_EXCEEDED (daily cap for this tool on this key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '404':
          description: TOOL_NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '405':
          description: METHOD_NOT_ALLOWED; use the method in the Allow response header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            Allow:
              schema:
                type: string
              description: Supported methods
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '409':
          description: TOOL_NOT_ACTIVE (temporarily unavailable; nothing is dispatched or charged), IDEMPOTENCY_CONFLICT, BILLING_SUSPENDED (provider consumption requires operator verification; no new call is dispatched)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '429':
          description: RATE_LIMITED (scope key or provider, retry_after_ms), PROVIDER_CAPACITY or FREE_TIER_EXHAUSTED
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            Retry-After:
              schema:
                type: integer
                minimum: 1
              description: Seconds to wait when a retry time is known
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '503':
          description: Temporarily unavailable. Read error.hint; do not create a duplicate execution after an uncertain outcome.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
      operationId: runTool
  /v1/runs/{id}:
    get:
      tags:
      - Run
      summary: Status and final price of a run; settles deferred runs on demand
      security:
      - apiKey: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Run view
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunView'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '404':
          description: RUN_NOT_FOUND
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '405':
          description: METHOD_NOT_ALLOWED; use the method in the Allow response header
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            Allow:
              schema:
                type: string
              description: Supported methods
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '429':
          description: RATE_LIMITED; wait before retrying
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            Retry-After:
              schema:
                type: integer
                minimum: 1
              description: Seconds to wait when a retry time is known
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
        '503':
          description: Temporarily unavailable. Read error.hint; do not create a duplicate execution after an uncertain outcome.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          headers:
            X-RateLimit-Limit:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Remaining:
              schema:
                type: integer
                minimum: 0
              description: Current caller's rate window; omitted when unavailable or limited by shared provider capacity
            X-RateLimit-Reset:
              schema:
                type: integer
                minimum: 0
              description: Unix seconds when capacity next becomes available in this sliding window
      operationId: getRun
  /mcp:
    post:
      tags:
      - Run
      summary: MCP Streamable HTTP endpoint (spec 2026-07-28, 2025 clients supported)
      description: 'Tools: discover_tools, inspect_tool, run_tool, run_and_show, get_run, list_plays, get_play, save_play, record_play_run. run_and_show runs a tool like run_tool and shows its result as an interactive view (MCP Apps). Requires a bearer: an OAuth 2.1 access token (hosted clients authorize through the metadata in WWW-Authenticate; a human approves once) or the API key ''Authorization: Bearer trk_...''.'
      security:
      - apiKey: []
      - oauth:
        - run
      responses:
        '200':
          description: JSON-RPC response
        '401':
          description: No valid bearer; WWW-Authenticate carries resource_metadata (RFC 9728)
      operationId: post_mcp
components:
  schemas:
    OutputTruncation:
      type: object
      description: 'Present when output_truncated. With method structural, output is valid JSON of the original shape: the listed arrays and objects keep their first elements or keys, the listed strings keep their beginning followed by a ''…[truncated: N of M chars omitted]'' suffix. With method raw (last resort), output is { truncated_json } holding the start of the serialized output.'
      required:
      - method
      - limit_chars
      - original_chars
      - returned_chars
      - omitted
      - note
      properties:
        method:
          type: string
          enum:
          - structural
          - raw
        limit_chars:
          type: integer
          description: Maximum compact JSON length of output
        original_chars:
          type: integer
        returned_chars:
          type: integer
        omitted:
          type: array
          items:
            type: object
            required:
            - path
            - type
            - unit
            - kept
            - total
            properties:
              path:
                type: string
                description: JSONPath of the shortened node
                examples:
                - $.tasks[0].result[0].items
              type:
                type: string
                enum:
                - array
                - object
                - string
              unit:
                type: string
                enum:
                - items
                - keys
                - chars
              kept:
                type: integer
              total:
                type: integer
        omitted_not_listed:
          type: integer
          description: Further shortened nodes not listed
        note:
          type: string
    TopupInfo:
      type: object
      properties:
        topup_url:
          type: string
          description: Page a human opens to pay; never callable by an agent
        request_id:
          type: string
        amount_usd:
          type: number
        fee_usd:
          type: number
        credit_usd:
          type: number
        presets_usd:
          type: array
          items:
            type: number
    InsufficientCreditsResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              enum:
              - INSUFFICIENT_CREDITS
              - PAID_CREDIT_REQUIRED
            message:
              type: string
            balance_usd:
              type: number
            price_usd:
              type: number
            payments_enabled:
              type: boolean
            topup:
              $ref: '#/components/schemas/TopupInfo'
    RunRequest:
      type: object
      required:
      - tool_id
      properties:
        tool_id:
          type: string
          examples:
          - serper/search
        input:
          type: object
          description: Must match the tool's inputSchema (see components Input_*)
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
            message:
              type: string
            hint:
              type: string
            request_id:
              type: string
            retry_after_ms:
              type: number
              minimum: 0
            documentation:
              type: string
              format: uri
          additionalProperties: true
    PromoBalance:
      type: object
      description: Promotional credit is used first on eligible non-video calls up to max_call_usd. expires_at is the next lot expiry.
      properties:
        available_usd:
          type: string
        expires_at:
          type:
          - string
          - 'null'
        max_call_usd:
          type: string
    RunResult:
      type: object
      required:
      - run_id
      - tool_id
      - status
      - price_quoted_usd
      - price_billed_usd
      - duration_ms
      - balance_usd
      - output
      properties:
        run_id:
          type: string
        tool_id:
          type: string
        status:
          type: string
          enum:
          - COMPLETED
          - FAILED
          - RUNNING
        http_status:
          type:
          - integer
          - 'null'
        price_quoted_usd:
          type: number
        price_billed_usd:
          type: number
        billed_units:
          type: number
        duration_ms:
          type: integer
        balance_usd:
          type: number
          description: Paid USD balance; can be negative after disclosed actual-cost settlement. New calls stop while an amount is owed.
        amount_owed_usd:
          type: number
          minimum: 0
          description: Unpaid actual usage after settlement; present only for a negative paid balance. No automatic card charge.
        available_usd:
          type: number
          description: Spendable credit including eligible promotional credit, or zero while a paid amount is owed; actual-cost tools require paid credit.
        promo_balance:
          $ref: '#/components/schemas/PromoBalance'
        output:
          description: Upstream response, shaped by the tool spec; null on failure
        attribution:
          type: string
          description: Credit the data's licence asks for, on completed runs of tools that have one. Show it wherever you show this output.
        output_truncated:
          type: boolean
          description: True when the output exceeded the size limit and was shortened; see output_truncation
        output_truncation:
          $ref: '#/components/schemas/OutputTruncation'
        error:
          type: string
        replayed:
          type: boolean
          description: True when an Idempotency-Key replayed a previous run
        route:
          type: object
          description: 'Routed tools (agentik/...): which provider answered and every attempt, each billed as a direct call of that tool. run_id is the serving attempt; prices are the sum of all attempts. A replay confirms the run but cannot show its output again.'
          required:
          - served_by
          - tried
          - max_cost_usd
          properties:
            served_by:
              type:
              - string
              - 'null'
            tried:
              type: array
              items:
                type: object
                required:
                - tool_id
                - outcome
                - charged_usd
                properties:
                  tool_id:
                    type: string
                  outcome:
                    type: string
                    enum:
                    - served
                    - empty
                    - failed
                    - pending
                    - refused
                    - rate_limited
                    - over_budget
                    - skipped
                  run_id:
                    type: string
                  charged_usd:
                    type: number
                  reserved_usd:
                    type: number
                    description: Still reserved while this provider's consumption is reconciled
                  code:
                    type: string
                  error:
                    type: string
            max_cost_usd:
              type: number
            ignored_inputs:
              type: array
              items:
                type: string
              description: Inputs the serving provider cannot apply
        settlement:
          type: object
          description: 'Deferred settlement: the reservation is settled when the upstream resource ends'
          properties:
            pending:
              type: boolean
            upstream_id:
              type: string
            reserved_usd:
              type: number
            expires_at:
              type: string
            how:
              type: string
    RunView:
      type: object
      properties:
        execution_phase:
          type: string
          enum:
          - reserved
          - dispatching
          - pending
          - reconciliation_required
          - finalized
          description: Reconciliation retains the reservation until an operator verifies the outcome.
        run_id:
          type: string
        tool_id:
          type: string
        status:
          type: string
          enum:
          - COMPLETED
          - FAILED
          - RUNNING
        http_status:
          type:
          - integer
          - 'null'
        price_quoted_usd:
          type: number
        price_billed_usd:
          type: number
        duration_ms:
          type:
          - integer
          - 'null'
        error:
          type:
          - string
          - 'null'
        created_at:
          type: string
        upstream_id:
          type: string
        settlement_pending:
          type: boolean
        expires_at:
          type: string
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: trk_...
      description: Workspace API key
    oauth:
      type: oauth2
      description: 'OAuth for MCP clients: PKCE S256, dynamic client registration or client ID metadata documents, refresh token rotation. With agent onboarding enabled, a verified account approves a dedicated execution key; otherwise the legacy authorization page accepts an existing workspace key. Tokens inherit the key policy.'
      flows:
        authorizationCode:
          authorizationUrl: https://api.agentik.cc/oauth/authorize
          tokenUrl: https://api.agentik.cc/oauth/token
          refreshUrl: https://api.agentik.cc/oauth/token
          scopes:
            run: Discover, inspect and run tools, paid from the workspace balance within the key's caps
externalDocs:
  url: https://api.agentik.cc/connect.md
  description: Connection guide
x-agentik-billing:
  payments_enabled: true
  topup_fee_model: added
  topup_fee_rate: 0.055
  topup_fee_min_usd: 0.8
  topup_min_usd: 5
  free_runs_per_day_unfunded: 50
  free_runs_per_day_funded: 1000