Livepeer · API Governance Rules

Livepeer API Rules

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

8 Rules error 2 warn 4 info 2
View Rules File View on GitHub

Rule Categories

livepeer

Rules

warn
livepeer-ai-operation-id-gen-prefix
AI pipeline operationIds must start with 'gen' (e.g. genTextToImage)
$.paths.*.post
warn
livepeer-ai-path-kebab-case
AI pipeline paths must use kebab-case
$.paths
warn
livepeer-ai-tags-required
AI pipeline operations should be tagged 'generate'
$.paths.*.post
info
livepeer-ai-pipeline-is-post
AI pipeline operations are POST (text-to-image, image-to-video, etc.)
$.paths[?(@property.match(/^\/(text-to-image|image-to-image|image-to-video|upscale|audio-to-text|segment-anything-2|llm|image-to-text|live-video-to-video|text-to-speech)$/))]
info
livepeer-ai-http-error-schema
AI Runner errors should reference HTTPError schema
$.components.schemas
error
livepeer-ai-server-required
AI specs must declare a server (dream-gateway.livepeer.cloud or livepeer.studio)
$
error
livepeer-ai-server-https
Servers must use HTTPS
$.servers[*].url
warn
livepeer-ai-operation-summary
Every AI pipeline operation needs a summary
$.paths.*[get,post]

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas

rules:
  # Livepeer AI Gateway / AI Runner conventions:
  # - All paths use kebab-case (/text-to-image, /image-to-video, /segment-anything-2, /live-video-to-video, /hardware/info)
  # - Single POST per pipeline endpoint (no GET/DELETE)
  # - Bearer + HTTPBearer security schemes
  # - operationIds use genXxx pattern (genTextToImage, genImageToImage)
  # - Request schemas suffix with Params (TextToImageParams, ImageToVideoParams)
  # - Response schemas suffix with Response (ImageResponse, AudioResponse, TextResponse)
  # - HTTPError schema for 4xx/5xx errors

  livepeer-ai-operation-id-gen-prefix:
    description: AI pipeline operationIds must start with 'gen' (e.g. genTextToImage)
    message: "AI operationId '{{value}}' must start with 'gen'"
    severity: warn
    given: "$.paths.*.post"
    then:
      field: operationId
      function: pattern
      functionOptions:
        match: "^gen[A-Z][a-zA-Z0-9]+$"

  livepeer-ai-path-kebab-case:
    description: AI pipeline paths must use kebab-case
    message: "Path '{{property}}' must use kebab-case"
    severity: warn
    given: "$.paths"
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: "^(/[a-z0-9-]+)+/?$"

  livepeer-ai-tags-required:
    description: AI pipeline operations should be tagged 'generate'
    message: "AI operation must declare tags"
    severity: warn
    given: "$.paths.*.post"
    then:
      field: tags
      function: truthy

  livepeer-ai-pipeline-is-post:
    description: AI pipeline operations are POST (text-to-image, image-to-video, etc.)
    message: "AI pipeline path '{{property}}' should expose POST"
    severity: info
    given: "$.paths[?(@property.match(/^\\/(text-to-image|image-to-image|image-to-video|upscale|audio-to-text|segment-anything-2|llm|image-to-text|live-video-to-video|text-to-speech)$/))]"
    then:
      field: post
      function: truthy

  livepeer-ai-http-error-schema:
    description: AI Runner errors should reference HTTPError schema
    message: "Component schema HTTPError must exist for AI errors"
    severity: info
    given: "$.components.schemas"
    then:
      field: HTTPError
      function: truthy

  livepeer-ai-server-required:
    description: AI specs must declare a server (dream-gateway.livepeer.cloud or livepeer.studio)
    message: "AI spec must declare at least one server"
    severity: error
    given: "$"
    then:
      field: servers
      function: truthy

  livepeer-ai-server-https:
    description: Servers must use HTTPS
    message: "Server URL '{{value}}' must use HTTPS"
    severity: error
    given: "$.servers[*].url"
    then:
      function: pattern
      functionOptions:
        match: "^https://"

  livepeer-ai-operation-summary:
    description: Every AI pipeline operation needs a summary
    message: "AI operation must declare summary"
    severity: warn
    given: "$.paths.*[get,post]"
    then:
      field: summary
      function: truthy

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/livepeer-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.