{
  "openapi": "3.1.0",
  "info": {
    "title": "Stripe Agentic Directory",
    "version": "1.0.0",
    "summary": "Find services an AI agent can sign up for, provision, call, and pay for through Stripe.",
    "description": "Public, read-only search over the Stripe Agentic Directory catalogue. No API key, no auth, CORS open.\nIt serves agents that can't run the Stripe CLI. Agents with a shell can run the same search with `stripe directory search \"<task>\" --format json` from the Directory plugin for the Stripe CLI.\n\nEach result is a directory entry, modeled on the proposed Directory Inspect response. Its `capabilities` say how to engage the provider, each with a `command` for the next step: `provisioning` (Stripe Projects), `machine_payments` (pay-per-call endpoints) and `mcp` (MCP servers you can connect to). `llms_txt`, `skill_md` and `open_api_spec` link the provider's docs for agents.\n\nRule: Never pay for anything, start a paid plan, or spend from a wallet without the user's explicit approval for that specific charge.\n\nLimits: about 60 requests per minute per client. Over the limit you get 429 with a Retry-After header. Successful responses may be served from a shared cache for up to 60 seconds."
  },
  "servers": [
    {
      "url": "https://directory-site-mu.vercelapp.stripe.dev"
    }
  ],
  "externalDocs": {
    "description": "Agent guide",
    "url": "https://directory-site-mu.vercelapp.stripe.dev/llms.txt"
  },
  "paths": {
    "/api/directory/search": {
      "get": {
        "operationId": "searchDirectory",
        "summary": "Search the Directory for providers",
        "description": "Describe the job in plain words (for example `send transactional email` or `postgres database`) and get matching providers with their agent capabilities.\n\nPage with `offset` while `has_more` is true.\n\nBefore acting on a result that costs money: Never pay for anything, start a paid plan, or spend from a wallet without the user's explicit approval for that specific charge.",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "What you need, in natural language. Surrounding whitespace is trimmed.",
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 5000
            },
            "example": "send transactional email"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Results per page.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Results to skip, for paging.",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching providers.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed per window (per client, per server instance).",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DirectoryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters (missing or short query, out-of-range limit or offset, or an unknown parameter). The body carries a hint with an example valid URL.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed per window (per client, per server instance).",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests. Wait Retry-After seconds, then retry.",
            "headers": {
              "RateLimit-Limit": {
                "description": "Requests allowed per window (per client, per server instance).",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Remaining": {
                "description": "Requests left in the current window.",
                "schema": {
                  "type": "integer"
                }
              },
              "RateLimit-Reset": {
                "description": "Seconds until the window resets.",
                "schema": {
                  "type": "integer"
                }
              },
              "Retry-After": {
                "description": "Seconds to wait before retrying.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "The search failed. Retry later.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "message"
            ],
            "properties": {
              "message": {
                "type": "string",
                "description": "What went wrong, in plain language."
              },
              "type": {
                "type": "string",
                "enum": [
                  "invalid_request",
                  "rate_limit",
                  "api_error"
                ],
                "description": "invalid_request: fix the request (see hint). rate_limit: wait Retry-After seconds. api_error: the search failed; retry later."
              },
              "hint": {
                "type": "string",
                "description": "How to fix an invalid request, with an example valid URL."
              },
              "docs": {
                "type": "string",
                "description": "Path to this OpenAPI document."
              }
            }
          }
        }
      },
      "DirectoryResponse": {
        "type": "object",
        "required": [
          "object",
          "data",
          "has_more",
          "url"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list"
          },
          "data": {
            "type": "array",
            "description": "Providers, best match first.",
            "items": {
              "$ref": "#/components/schemas/DirectoryEntry"
            }
          },
          "has_more": {
            "type": "boolean",
            "description": "True when another page exists; request it with a larger offset."
          },
          "total_count": {
            "type": "integer",
            "description": "Total matches, when known."
          },
          "url": {
            "type": "string",
            "const": "/api/directory/search"
          }
        }
      },
      "DirectoryEntry": {
        "type": "object",
        "description": "One provider. Only `id` and `capabilities` are always present; a capability that is absent is not available.",
        "required": [
          "id",
          "capabilities"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable profile ID."
          },
          "display_name": {
            "type": "string",
            "description": "Provider name to show the user."
          },
          "username": {
            "type": "string",
            "description": "Directory handle for the provider."
          },
          "description": {
            "type": "string",
            "description": "What the provider offers."
          },
          "url": {
            "type": "string",
            "description": "The provider's own website."
          },
          "llms_txt": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The provider's llms.txt files: an index of its docs written for agents."
          },
          "open_api_spec": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The provider's OpenAPI documents, which describe its API."
          },
          "skill_md": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Skills written for agents: how to sign up, authenticate, and use the service."
          },
          "capabilities": {
            "$ref": "#/components/schemas/Capabilities"
          }
        }
      },
      "Capabilities": {
        "type": "object",
        "description": "How an agent can engage the provider. Each capability has a `description` and a `command` for the next step.",
        "properties": {
          "machine_payments": {
            "$ref": "#/components/schemas/MachinePayments"
          },
          "mcp": {
            "$ref": "#/components/schemas/Mcp"
          },
          "provisioning": {
            "$ref": "#/components/schemas/Provisioning"
          }
        }
      },
      "MachinePayments": {
        "type": "object",
        "description": "Machine Payments Protocol (MPP): pay-per-call HTTP endpoints. The agent pays for each request as part of the HTTP exchange. Never pay for anything, start a paid plan, or spend from a wallet without the user's explicit approval for that specific charge.",
        "required": [
          "description",
          "command",
          "payment_endpoints_validated"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "What the paid endpoints do."
          },
          "command": {
            "type": "string",
            "description": "How to pay this provider."
          },
          "payment_endpoints_validated": {
            "type": "boolean",
            "description": "True when Stripe Agentic Directory has checked that the paid endpoints return a payment challenge."
          },
          "endpoints": {
            "type": "array",
            "description": "Paid endpoints, when known.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "Mcp": {
        "type": "object",
        "description": "Model Context Protocol (MCP): the provider runs MCP servers an agent can connect to as a tool source.",
        "required": [
          "description",
          "command",
          "mcp_servers_validated",
          "servers"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "command": {
            "type": "string",
            "description": "How to connect."
          },
          "mcp_servers_validated": {
            "type": "boolean",
            "description": "True when each server answered an MCP initialize request."
          },
          "servers": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "description": "Add it to your MCP client to use the provider's tools."
                },
                "auth": {
                  "type": "string",
                  "enum": [
                    "required",
                    "none"
                  ],
                  "description": "Whether the server asks you to sign in."
                }
              }
            }
          }
        }
      },
      "Provisioning": {
        "type": "object",
        "description": "Stripe Projects: provision the service into an account the user owns from the Stripe CLI. Agents without a shell can pass the command to the user to run. Only provision when the user asks.",
        "required": [
          "description",
          "command"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "command": {
            "type": "string",
            "description": "The `stripe projects` commands to run."
          }
        }
      }
    }
  }
}