Runloop · API Governance Rules

Runloop API Rules

Spectral linting rules defining API design standards and conventions for Runloop.

8 Rules error 1 warn 5
View Rules File View on GitHub

Rule Categories

runloop

Rules

warn
runloop-bearer-auth-required
All Runloop operations require the bearerAuth security scheme.
$.paths[*][get,post,put,patch,delete]
warn
runloop-v1-prefix
Public Runloop endpoints live under /v1/.
$.paths
warn
runloop-snake-case-path-params
Runloop uses snake_case for path parameter names.
$.paths[*][*].parameters[?(@.in == "path")].name
warn
runloop-snake-case-query-params
Runloop uses snake_case for query parameter names.
$.paths[*][*].parameters[?(@.in == "query")].name
error
runloop-operation-id-required
Every operation must have an operationId so SDK generators can produce method names.
$.paths[*][get,post,put,patch,delete]
hint
runloop-title-case-summary
Operation summaries use Title Case.
$.paths[*][get,post,put,patch,delete].summary
hint
runloop-canonical-tags
Use canonical Runloop tags.
$.paths[*][get,post,put,patch,delete].tags[*]
warn
runloop-canonical-server
Servers list must include https://api.runloop.ai.
$.servers[*].url

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas

functions: []

rules:
  # Runloop convention: bearer auth via RUNLOOP_API_KEY
  runloop-bearer-auth-required:
    description: All Runloop operations require the bearerAuth security scheme.
    message: 'Operation must declare bearerAuth security (RUNLOOP_API_KEY).'
    severity: warn
    given:
      - $.paths[*][get,post,put,patch,delete]
    then:
      - field: security
        function: truthy

  # Path prefix: /v1/<resource>
  runloop-v1-prefix:
    description: Public Runloop endpoints live under /v1/.
    message: 'Path "{{path}}" should begin with /v1/ (or be the /pty/ control plane).'
    severity: warn
    given: $.paths
    then:
      function: pattern
      functionOptions:
        match: '^/(v1/|pty/)'

  # Snake_case identifiers in path parameters
  runloop-snake-case-path-params:
    description: Runloop uses snake_case for path parameter names.
    message: 'Path parameter "{{value}}" should be snake_case (e.g. devbox_id).'
    severity: warn
    given: $.paths[*][*].parameters[?(@.in == "path")].name
    then:
      function: pattern
      functionOptions:
        match: '^[a-z][a-z0-9_]*$'

  # Snake_case for query parameters too
  runloop-snake-case-query-params:
    description: Runloop uses snake_case for query parameter names.
    severity: warn
    given: $.paths[*][*].parameters[?(@.in == "query")].name
    then:
      function: pattern
      functionOptions:
        match: '^[a-z][a-z0-9_]*$'

  # operationId required (Stainless-generated SDKs depend on this)
  runloop-operation-id-required:
    description: Every operation must have an operationId so SDK generators can produce method names.
    severity: error
    given: $.paths[*][get,post,put,patch,delete]
    then:
      field: operationId
      function: truthy

  # Title Case summaries (project-wide convention)
  runloop-title-case-summary:
    description: Operation summaries use Title Case.
    severity: hint
    given: $.paths[*][get,post,put,patch,delete].summary
    then:
      function: pattern
      functionOptions:
        match: '^[A-Z]'

  # Tags should be drawn from the canonical Runloop tag set
  runloop-canonical-tags:
    description: Use canonical Runloop tags.
    severity: hint
    given: $.paths[*][get,post,put,patch,delete].tags[*]
    then:
      function: enumeration
      functionOptions:
        values:
          - Devbox
          - Devbox-Lifecycle
          - Devbox-FileTools
          - Devbox-ShellTools
          - Devbox-NetworkTools
          - Devbox-ObservabilityTools
          - Devbox-PersistenceTools
          - Blueprint
          - Blueprint-Lifecycle
          - Blueprint-ObservabilityTools
          - Benchmark
          - Scenario
          - ScenarioScorer
          - agents
          - axons
          - executions
          - objects
          - secrets
          - apikeys
          - restricted_keys
          - gateway-configs
          - mcp-configs
          - network-policies
          - streaming

  # Server should be api.runloop.ai
  runloop-canonical-server:
    description: Servers list must include https://api.runloop.ai.
    severity: warn
    given: $.servers[*].url
    then:
      function: pattern
      functionOptions:
        match: '^https://api\\.runloop\\.ai'

Work with this as data

Every ruleset 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 spectral rules

4 MCP tools reach this
  • find_rulesBrowse and filter every ruleset in the catalog.
  • 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 ruleset
curl "https://apis.io/api/v1/rules/runloop-ai-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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.