VPSnet Functions API

Firecracker Functions - serverless-style code execution in isolated microVMs. Invocations are usage-billed (CPU + memory seconds).

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 11

POST /fn/{uuid}/hook PAID: invoke a webhook-enabled Firecracker Function #
GET /account/firecracker/functions List Firecracker Functions #
POST /account/firecracker/functions Create a function (name, runtime_os_id, code; usage-billed per invocation) #
GET /account/firecracker/functions/history List bounded cross-function invocation history #
GET /account/firecracker/functions/{functionId} Get a function with code, config, and webhook details #
POST /account/firecracker/functions/{functionId} Update a function (explicit acknowledgement is required before replacing… #
DELETE /account/firecracker/functions/{functionId} Delete a function #
POST /account/firecracker/functions/{functionId}/invoke PAID: invoke a function (wait=true returns the result synchronously) #
GET /account/firecracker/functions/{functionId}/invocations List invocations with status, duration, and cost #
GET /account/firecracker/functions/{functionId}/invocations/{invocationId} Get one invocation including output/logs and usage cost #
GET /public/prices/firecracker/functions Get Firecracker Functions usage prices #

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/vpsnet-com:vpsnet-com-functions-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

vpsnet-com-functions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: VPSnet Functions API
  description: 'VPSnet API reference (v1).


    Authenticated endpoints use an API key in the `X-API-KEY` header.

    Create a key in the control panel: Account → API keys

    (https://www.vpsnet.com/en/management/account/api-keys).

    Public endpoints are available under `/public/*` without authentication.

    This specification is intentionally partial and may omit fields from responses.


    Every error response follows `ErrorEnvelope`: `success: false`, a stable

    error code as a top-level boolean key, and any actionable context as

    further top-level keys (`requiredScope`, `retryAfter`/`retry_after`,

    `usageAccess`, `guestAgent`, `state`, and similar). Responses that carry

    such context now repeat it inside a nested `error_detail` object keyed by

    the same error code, so one parsing strategy works everywhere. The flat

    keys are unchanged and remain authoritative; `error_detail` is additive and

    may be ignored.

    Private networking paths resolve to private-networking-v1.yml; contract v2

    capability discovery resolves to private-networking-v2.yml. Their errors use

    reason_code alongside success=false, with explicit same-key retry advice

    for uncertain mutation outcomes.

    Service hostname/PTR operations resolve to service-identity-v1.yml. The

    isolated OpenAI-compatible inference API is published separately as

    managed-inference-v1.yml because it uses a different base URL and bearer

    credential boundary.'
  termsOfService: https://www.vpsnet.com/en/information/term-of-service
  contact:
    email: info@vpsnet.com
  version: 1.0.0
  license:
    name: VPSnet API Terms
    url: https://www.vpsnet.com/en/information/term-of-service
servers:
- url: https://api.vpsnet.com
  description: Production
tags:
- name: Functions
  description: Firecracker Functions - serverless-style code execution in isolated microVMs. Invocations are usage-billed (CPU + memory seconds).
paths:
  /fn/{uuid}/hook:
    post:
      tags:
      - Functions
      summary: 'PAID: invoke a webhook-enabled Firecracker Function'
      description: 'Invoke a function through its public webhook UUID. Authenticate with the

        per-function webhook secret returned to an authenticated control-panel

        session when the webhook is enabled. The invocation is usage-billed to

        the function owner. API keys cannot read the webhook secret.


        The request body, form data, or sanitized query values become the

        function input. Requests and resulting function input are limited to

        1 MiB. By default the request waits up to the function timeout and

        returns stdout; set `wait=false` to queue the invocation and receive

        `202 Accepted`. Other HTTP methods return `405 Method Not Allowed`.


        Webhook delivery is only offered where the installation has a reachable

        delivery endpoint. Check `webhook.available` and `webhook.url` on the

        function payload before integrating: when `webhook.available` is

        `false` no URL or secret is issued, and this endpoint answers

        `503` with `webhookDeliveryUnavailable`.'
      operationId: invokeFunctionWebhook
      parameters:
      - name: uuid
        in: path
        required: true
        description: Public webhook UUID returned in the function metadata
        schema:
          type: string
      - name: X-Function-Webhook-Token
        in: header
        required: true
        description: Per-function webhook secret
        schema:
          type: string
      - name: wait
        in: query
        required: false
        description: Wait for completion instead of returning the queued invocation
        schema:
          type: boolean
          default: true
      requestBody:
        required: false
        description: Raw function input, maximum 1 MiB
        content:
          application/json:
            schema: {}
          text/plain:
            schema:
              type: string
              maxLength: 1048576
          application/x-www-form-urlencoded:
            schema:
              type: object
              additionalProperties: true
      responses:
        '200':
          description: Function stdout after synchronous successful completion
          content:
            application/json:
              schema: {}
            text/plain:
              schema:
                type: string
        '202':
          description: Invocation queued or still running
        '401':
          description: Missing or invalid webhook token
        '404':
          description: Unknown webhook UUID
        '409':
          description: Function or webhook disabled, or runtime is not ready
        '413':
          description: Request or function input exceeds 1 MiB
        '429':
          description: Lookup, function, owner, or replay rate limit exceeded
        '500':
          description: Function execution failed
        '503':
          description: Webhook delivery unavailable on this installation (`webhookDeliveryUnavailable`), or billing anchor, execution server, or dispatch unavailable
        '504':
          description: Function execution timed out
      security: []
  /account/firecracker/functions:
    get:
      tags:
      - Functions
      summary: List Firecracker Functions
      description: Requires services:read. The default response retains the full legacy catalogue, platform, webhook, usage and pricing metadata. Set summary to true and projection to ui-list for the bounded first-party list payload containing only functions, limits, serviceAnchor and usageAccess; protected-field integrity metadata is omitted from its function cards.
      x-api-key-scope: services:read
      operationId: listFunctions
      parameters:
      - name: summary
        in: query
        required: false
        description: Select compact function rows without protected-field integrity metadata.
        schema:
          type: boolean
          default: false
      - name: projection
        in: query
        required: false
        description: ui-list is honored together with summary=true.
        schema:
          type: string
          enum:
          - ui-list
      responses:
        '200':
          description: OK
        '403':
          description: Missing services:read scope
      security:
      - apiKey: []
    post:
      tags:
      - Functions
      summary: Create a function (name, runtime_os_id, code; usage-billed per invocation)
      description: 'Requires services:manage. An optional stable Idempotency-Key makes transport retries exact: the same key and canonical request replay the original status and JSON bytes, while changed input returns 409. The idempotencyKey or idempotency_key JSON field is accepted as a compatibility fallback and all supplied representations must match.'
      x-api-key-scope: services:manage
      operationId: createFunction
      parameters:
      - $ref: '#/components/parameters/FunctionCreateIdempotencyKey'
      responses:
        '200':
          description: OK
        '400':
          description: Malformed or conflicting idempotency-key representations
        '403':
          description: Missing services:manage scope
        '409':
          description: Quota reached or changed request for a key inside its 30-day retention window
        '503':
          description: Create mutex, service anchor, or operator-assisted recovery unavailable
      security:
      - apiKey: []
  /account/firecracker/functions/history:
    get:
      tags:
      - Functions
      summary: List bounded cross-function invocation history
      description: 'Requires services:read. The backward-compatible default includes full invocation bodies. Set summary=true for the first-party history list: it selects only summary columns, omits input_payload, stdout, stderr, billing and usage-bucket fields, and preloads function/runtime summaries without per-invocation queries. Open the exact invocation endpoint when the customer requests full input or output details. Paginated: deliberately never returns every invocation on one page (a high-frequency webhook function can accumulate a very large count), so read the returned pagination block and pass page for more.'
      x-api-key-scope: services:read
      operationId: listFunctionHistory
      parameters:
      - name: summary
        in: query
        required: false
        schema:
          type: boolean
          default: false
      - name: limit
        in: query
        required: false
        description: Page size. Small on purpose — page through with `page`, not with a larger limit.
        schema:
          type: integer
          minimum: 1
          maximum: 200
          default: 25
      - name: page
        in: query
        required: false
        description: 1-based page number.
        schema:
          type: integer
          minimum: 1
          default: 1
      - name: search
        in: query
        required: false
        description: Search invocation IDs, status, retained bodies, and function metadata before limiting.
        schema:
          type: string
          maxLength: 200
      - name: function_id
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
      - name: status
        in: query
        required: false
        schema:
          type: string
          maxLength: 64
      responses:
        '200':
          description: Bounded, paginated history. With summary=true each invocation omits input_payload, stdout, stderr, input_bytes, output_retained, billing_status and usage_bucket. The `pagination` block reports page, pages, perPage, and total.
        '403':
          description: Missing services:read scope
      security:
      - apiKey: []
  /account/firecracker/functions/{functionId}:
    get:
      tags:
      - Functions
      summary: Get a function with code, config, and webhook details
      description: Requires services:read.
      x-api-key-scope: services:read
      operationId: getFunction
      parameters:
      - name: functionId
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
        '403':
          description: Missing services:read scope
      security:
      - apiKey: []
    post:
      tags:
      - Functions
      summary: Update a function (explicit acknowledgement is required before replacing…
      description: Requires services:manage. Uses the same fields as function creation. If stored code or environment cannot be decrypted, the update is refused unless acknowledge_unreadable_replacement is true. Set that flag only after retrieving the function, reviewing integrity.unreadable_fields, and explicitly confirming replacement of those unavailable values from a trusted copy. rotate_webhook_secret=true rotates the webhook secret.
      x-api-key-scope: services:manage
      operationId: updateFunction
      parameters:
      - name: functionId
        in: path
        required: true
        schema:
          type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                acknowledge_unreadable_replacement:
                  type: boolean
                  default: false
                  description: Explicitly approve replacing stored code or environment that the function detail response marked unreadable. Never set this without the customer's approval and a trusted copy of every unavailable value being replaced.
      responses:
        '200':
          description: OK
        '403':
          description: Missing services:manage scope
        '409':
          description: functionDataUnreadable — stored code or environment cannot be read and acknowledge_unreadable_replacement was not true
      security:
      - apiKey: []
    delete:
      tags:
      - Functions
      summary: Delete a function
      description: Requires services:manage.
      x-api-key-scope: services:manage
      operationId: deleteFunction
      parameters:
      - name: functionId
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
        '403':
          description: Missing services:manage scope
      security:
      - apiKey: []
  /account/firecracker/functions/{functionId}/invoke:
    post:
      tags:
      - Functions
      summary: 'PAID: invoke a function (wait=true returns the result synchronously)'
      description: 'Requires services:manage and, for API keys, full access with paid operations enabled and the fn:invoke paid scope. Queue one usage-billed function execution. A stable Idempotency-Key is required so transport or agent retries cannot execute and bill the same logical request twice. Reusing the key with the exact same input and wait value returns the original invocation with replayed=true; changing either value returns 409 and does not create a new invocation. OAuth connections require separate functions:invoke consent with a function_daily_limit_eur ceiling and acknowledge_usage_billing=true. The ceiling counts total account Functions daily usage, including pending reservations, and remains effective across token rotation. An API key''s own daily_spend_limit_eur and monthly_spend_limit_eur bound the same way: the cap is the lower of the platform cap and the key''s limit, counted on total account Functions usage including pending reservations; a paid key without both limits is refused with apiKeySpendCapRequired.'
      x-api-key-scope: services:manage
      x-paid-scope: fn:invoke
      x-api-key-access: full
      operationId: invokeFunction
      parameters:
      - name: functionId
        in: path
        required: true
        schema:
          type: integer
      - $ref: '#/components/parameters/FunctionInvocationIdempotencyKey'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                acknowledge_usage_billing:
                  type: boolean
                  description: Required as true for OAuth connections; acknowledges metered execution charges.
                input:
                  description: Any JSON value. Objects and arrays are serialized as JSON; scalar values are converted to text. The resulting UTF-8 payload must not exceed 1 MiB. Use base64 text for binary data.
                  oneOf:
                  - type: string
                  - type: number
                  - type: boolean
                  - type: object
                    additionalProperties: true
                  - type: array
                    items: {}
                  - type:
                    - string
                    - 'null'
                    enum:
                    - null
                wait:
                  type: boolean
                  default: true
      responses:
        '200':
          description: Invocation accepted, replayed, or synchronously completed
        '202':
          description: Dispatch may have succeeded but its publisher confirmation was lost; retain and poll the returned invocation rather than creating a new key
        '402':
          description: Daily or monthly Functions spend cap reached (functionSpendCapExceeded with scope, limit_eur and used_eur)
        '403':
          description: Missing services:manage, full-key, or fn:invoke access, or a paid API key without daily and monthly spend limits (apiKeySpendCapRequired)
        '409':
          description: The key is in use by another request or was already bound to different input/wait semantics
        '422':
          description: Missing or malformed idempotency key, or missing OAuth usage-billing acknowledgment
        '503':
          description: Billing reservation, idempotency storage, execution server, or dispatch unavailable
      security:
      - apiKey: []
      - mcpOAuth:
        - functions:invoke
  /account/firecracker/functions/{functionId}/invocations:
    get:
      tags:
      - Functions
      summary: List invocations with status, duration, and cost
      description: Requires services:read.
      x-api-key-scope: services:read
      operationId: listFunctionInvocations
      parameters:
      - name: functionId
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
        '403':
          description: Missing services:read scope
      security:
      - apiKey: []
  /account/firecracker/functions/{functionId}/invocations/{invocationId}:
    get:
      tags:
      - Functions
      summary: Get one invocation including output/logs and usage cost
      description: Requires services:read.
      x-api-key-scope: services:read
      operationId: getFunctionInvocation
      parameters:
      - name: functionId
        in: path
        required: true
        schema:
          type: integer
      - name: invocationId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
        '403':
          description: Missing services:read scope
      security:
      - apiKey: []
  /public/prices/firecracker/functions:
    get:
      tags:
      - Functions
      summary: Get Firecracker Functions usage prices
      description: 'Return the current per-invocation and per-second usage rates of Firecracker Functions in EUR before VAT: a base charge per invocation, a rate per vCPU-second and a memory rate per MB-second (memory_gb_second_eur is the same rate per GB-second). No authentication is required.'
      operationId: getPublicFunctionsPricing
      security: []
      responses:
        '200':
          description: Functions usage rates
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                - pricing
                properties:
                  success:
                    type: boolean
                    enum:
                    - true
                  pricing:
                    type: object
                    required:
                    - base_eur
                    - vcpu_second_eur
                    - memory_mb_second_eur
                    - memory_gb_second_eur
                    properties:
                      base_eur:
                        type: number
                      vcpu_second_eur:
                        type: number
                      memory_mb_second_eur:
                        type: number
                      memory_gb_second_eur:
                        type: number
              example:
                success: true
                pricing:
                  base_eur: 2.0e-07
                  vcpu_second_eur: 4.0e-06
                  memory_mb_second_eur: 1.953125e-09
                  memory_gb_second_eur: 2.0e-06
components:
  parameters:
    FunctionInvocationIdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      description: Client-global key for one exact paid function invocation. Reuse it only with the same function, input, and wait value. The idempotencyKey or idempotency_key JSON field is accepted as a compatibility fallback, but multiple representations must match exactly.
      schema:
        type: string
        minLength: 16
        maxLength: 190
        pattern: ^[A-Za-z0-9._:-]{16,190}$
    FunctionCreateIdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: Optional client-global key for one exact Function create. Reuse it only with the same request. The idempotencyKey or idempotency_key JSON field is accepted as a compatibility fallback, but multiple representations must match exactly. Exact encrypted responses are retained for 30 days; during that window the key is conflict-protected and replays exactly. The bounded receipt is deleted after the window, after which the same client may deliberately reuse the key for a new create request.
      schema:
        type: string
        minLength: 16
        maxLength: 190
        pattern: ^[A-Za-z0-9][A-Za-z0-9._:-]{15,189}$
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-API-KEY
      in: header
      description: Account API key (`vpsnet_` + 43 characters). Every key has one request budget of 300 requests per 60 seconds by default; some operations have lower limits of their own. A refused request answers 429 with retry_after in the body and the same value in the Retry-After header, plus X-RateLimit-Limit and X-RateLimit-Remaining. API keys cannot create, change or revoke API keys (403 apiKeyForbidden, reason api_keys_cannot_manage_api_keys).
    mcpOAuth:
      type: oauth2
      description: 'AI connection (MCP client) token issued by the VPSnet OAuth 2.1 authorization server, sent as `Authorization: Bearer vpsnet_...`. Discovery: /.well-known/oauth-authorization-server/oauth/mcp. A client registers dynamically (POST /oauth/mcp/register; public, or with a secret sent by HTTP Basic or in the form body), identifies itself by a client ID metadata document URL, or uses an application the customer created in the control panel (AI connections; client ID and secret, approvable only by that account). Every client must use S256 PKCE. A `resource` parameter, when sent, must equal the VPSnet MCP server address exactly; when omitted, that address is meant. The scope names offline_access, openid, profile and email are accepted and grant nothing; any other unknown scope is refused. The customer approves the connection in the control panel; it ends 30 days after approval. Access tokens last at most 15 minutes; refresh tokens rotate on every use and a replayed one revokes the whole connection.'
      flows:
        authorizationCode:
          authorizationUrl: https://api.vpsnet.com/oauth/mcp/authorize
          tokenUrl: https://api.vpsnet.com/oauth/mcp/token
          refreshUrl: https://api.vpsnet.com/oauth/mcp/token
          scopes:
            orders:read: Inspect plans and purchase receipts on the same connection
            orders:servers: Order servers from balance within approved limits
            orders:domains: Register domains from balance within approved limits
            services:read: Read the selected services
            services:manage: Start, stop, restart and rename the selected services
            applications:read: Read applications on the selected services
            applications:manage: Install and manage applications on the selected services
            networking:read: Read account networking
            networking:manage: Change account networking (no orders or payments)
            functions:read: Read Firecracker Functions
            functions:manage: Manage Firecracker Functions
            functions:invoke: Run Functions with explicit usage-billing consent and a daily account-usage ceiling
            vm:diagnostics: Inspect OS, processes, services, ports and containers with fixed diagnostics
            vm:files:read: Read files on selected Linux servers
            vm:files:write: Create and replace files on selected Linux servers
            services:reinstall: Reinstall the selected server operating system
            services:restore: Restore or delete existing server snapshots
            vm:exec: Run commands as root on the selected Linux servers
            vm:files: Read and write files on the selected Linux servers
    sessionBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Interactive VPSnet portal session; X-API-KEY is not accepted
x-related-apis:
- name: VPSnet AI Inference API
  url: https://www.vpsnet.com/managed-inference-v1.yml