{
  "openapi": "3.1.0",
  "info": {
    "title": "BlockRun API (account entry point)",
    "version": "1.0.0",
    "description": "BlockRun is the routing and payment layer for AI. One OpenAI-compatible endpoint routes to 100+ LLMs plus image, video, music and speech generation, web search, prediction-market and on-chain data, and multi-chain RPC. This host is the account-balance entry point: authenticate with an API key and pay from a BlockRun account funded by card or wire \u2014 no wallet signature per call. The same services are also sold per call in USDC over x402 at blockrun.ai (Base), sol.blockrun.ai (Solana) and arc.blockrun.ai (Arc).",
    "contact": {
      "email": "hello@blockrun.ai",
      "url": "https://blockrun.ai"
    },
    "termsOfService": "https://blockrun.ai/terms"
  },
  "servers": [
    {
      "url": "https://api.blockrun.ai"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "BlockRun API key from https://user.blockrun.ai/dashboard/keys"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1/models": {
      "get": {
        "operationId": "get_models",
        "summary": "Live model catalog with per-token prices",
        "description": "Live model catalog with per-token prices. Free.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Insufficient account balance \u2014 add credit at https://user.blockrun.ai/dashboard/credits"
          },
          "429": {
            "description": "Rate limited; Retry-After set"
          }
        }
      }
    },
    "/v1/images/models": {
      "get": {
        "operationId": "get_images_models",
        "summary": "Image/video model catalog with per-call prices",
        "description": "Image/video model catalog with per-call prices. Free.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Insufficient account balance \u2014 add credit at https://user.blockrun.ai/dashboard/credits"
          },
          "429": {
            "description": "Rate limited; Retry-After set"
          }
        }
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "get_usage",
        "summary": "One row per request over a window",
        "description": "One row per request over a window. Free.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Insufficient account balance \u2014 add credit at https://user.blockrun.ai/dashboard/credits"
          },
          "429": {
            "description": "Rate limited; Retry-After set"
          }
        }
      }
    },
    "/v1/usage/summary": {
      "get": {
        "operationId": "get_usage_summary",
        "summary": "Totals over a window: per day, model, endpoint, key",
        "description": "Totals over a window: per day, model, endpoint, key. Free.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Insufficient account balance \u2014 add credit at https://user.blockrun.ai/dashboard/credits"
          },
          "429": {
            "description": "Rate limited; Retry-After set"
          }
        }
      }
    },
    "/v1/balance": {
      "get": {
        "operationId": "get_balance",
        "summary": "Available balance, recorded spend, open reservations",
        "description": "Available balance, recorded spend, open reservations. Free.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Insufficient account balance \u2014 add credit at https://user.blockrun.ai/dashboard/credits"
          },
          "429": {
            "description": "Rate limited; Retry-After set"
          }
        }
      }
    },
    "/v1/chat/completions": {
      "post": {
        "operationId": "post_chat_completions",
        "summary": "OpenAI Chat Completions for every model; streaming and tools",
        "description": "OpenAI Chat Completions for every model; streaming and tools. Billed per token from the account balance.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Insufficient account balance \u2014 add credit at https://user.blockrun.ai/dashboard/credits"
          },
          "429": {
            "description": "Rate limited; Retry-After set"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "model": "openai/gpt-4.1-mini",
                "messages": [
                  {
                    "role": "user",
                    "content": "hello"
                  }
                ]
              }
            }
          }
        },
        "x-billing": {
          "unit": "per token",
          "source": "account balance",
          "priceSheet": "https://api.blockrun.ai/v1/models"
        }
      }
    },
    "/v1/messages": {
      "post": {
        "operationId": "post_messages",
        "summary": "Anthropic Messages, native envelopes",
        "description": "Anthropic Messages, native envelopes. Billed per token from the account balance.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Insufficient account balance \u2014 add credit at https://user.blockrun.ai/dashboard/credits"
          },
          "429": {
            "description": "Rate limited; Retry-After set"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "x-billing": {
          "unit": "per token",
          "source": "account balance",
          "priceSheet": "https://api.blockrun.ai/v1/models"
        }
      }
    },
    "/v1/responses": {
      "post": {
        "operationId": "post_responses",
        "summary": "OpenAI Responses API",
        "description": "OpenAI Responses API. Billed per token from the account balance.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Insufficient account balance \u2014 add credit at https://user.blockrun.ai/dashboard/credits"
          },
          "429": {
            "description": "Rate limited; Retry-After set"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "x-billing": {
          "unit": "per token",
          "source": "account balance",
          "priceSheet": "https://api.blockrun.ai/v1/models"
        }
      }
    },
    "/v1/images/generations": {
      "post": {
        "operationId": "post_images_generations",
        "summary": "Image generation",
        "description": "Image generation. Billed per image from the account balance.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Insufficient account balance \u2014 add credit at https://user.blockrun.ai/dashboard/credits"
          },
          "429": {
            "description": "Rate limited; Retry-After set"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "x-billing": {
          "unit": "per image",
          "source": "account balance",
          "priceSheet": "https://api.blockrun.ai/v1/models"
        }
      }
    },
    "/v1/videos/generations": {
      "post": {
        "operationId": "post_videos_generations",
        "summary": "Video generation; returns a poll_url to use verbatim",
        "description": "Video generation; returns a poll_url to use verbatim. Billed per second from the account balance.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Insufficient account balance \u2014 add credit at https://user.blockrun.ai/dashboard/credits"
          },
          "429": {
            "description": "Rate limited; Retry-After set"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "x-billing": {
          "unit": "per second",
          "source": "account balance",
          "priceSheet": "https://api.blockrun.ai/v1/models"
        }
      }
    },
    "/v1/audio/speech": {
      "post": {
        "operationId": "post_audio_speech",
        "summary": "Text to speech",
        "description": "Text to speech. Billed per character from the account balance.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Insufficient account balance \u2014 add credit at https://user.blockrun.ai/dashboard/credits"
          },
          "429": {
            "description": "Rate limited; Retry-After set"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "x-billing": {
          "unit": "per character",
          "source": "account balance",
          "priceSheet": "https://api.blockrun.ai/v1/models"
        }
      }
    },
    "/v1/search": {
      "post": {
        "operationId": "post_search",
        "summary": "Live web / news / X search",
        "description": "Live web / news / X search. Billed flat per call from the account balance.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Insufficient account balance \u2014 add credit at https://user.blockrun.ai/dashboard/credits"
          },
          "429": {
            "description": "Rate limited; Retry-After set"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "x-billing": {
          "unit": "flat per call",
          "source": "account balance",
          "priceSheet": "https://api.blockrun.ai/v1/models"
        }
      }
    }
  },
  "externalDocs": {
    "url": "https://api.blockrun.ai/llms.txt",
    "description": "Agent-readable reference"
  }
}