{
  "openapi": "3.1.0",
  "info": {
    "title": "Sinbad by Tidal AI: open routes and MCP address",
    "version": "1.0.0",
    "summary": "What anyone may read from Sinbad, and its MCP address.",
    "description": "Sinbad is AI that does the work. Describe an app, a website, a document, a slide deck, a spreadsheet, a picture, a film or a game: agents make it on a computer of their own, check it before they reply, and hand it to you or put it live at its own address. Made by Tidal AI, a UK AI lab. In beta.\n\nThis describes what is open or offered to other programs. Sinbad's own app uses a private set of routes with a browser sign-in; they are not described here and change without notice. Documentation: https://tidal-ai.space/docs.",
    "contact": {
      "name": "Tidal AI",
      "url": "https://tidal-ai.space/about"
    }
  },
  "servers": [
    {
      "url": "https://tidal-ai.space"
    }
  ],
  "externalDocs": {
    "description": "Sinbad documentation",
    "url": "https://tidal-ai.space/docs"
  },
  "paths": {
    "/api/changelog": {
      "get": {
        "summary": "What changed in Sinbad, newest first.",
        "description": "The entries, each with id, date, type, title and body, and the kinds there are.",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "description": "Only this kind of entry: new, improved or fixed.",
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "improved",
                "fixed"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "At most this many entries.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The entries, each with id, date, type, title and body, and the kinds there are.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "entries",
                    "types"
                  ],
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/legal": {
      "get": {
        "summary": "The terms and notices, and the version of each.",
        "description": "Whether the terms are in force, and each document with its id, title and version date.",
        "responses": {
          "200": {
            "description": "Whether the terms are in force, and each document with its id, title and version date.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "inForce",
                    "docs"
                  ],
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/legal/{id}": {
      "get": {
        "summary": "One terms or notice page as text and HTML.",
        "description": "The page: title, version date, what changed, and its HTML.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "terms, privacy, cookies, acceptable-use, refunds, data-processing, subprocessors or report.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The page: title, version date, what changed, and its HTML.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "id",
                    "title",
                    "version",
                    "html"
                  ],
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/showcase": {
      "get": {
        "summary": "Apps their owners chose to show on the front page.",
        "description": "A list of shown apps, each with a title, an address and what it cost to build.",
        "responses": {
          "200": {
            "description": "A list of shown apps, each with a title, an address and what it cost to build.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "apps"
                  ],
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/gallery": {
      "get": {
        "summary": "Pieces published in the gallery.",
        "description": "The pieces, each with id, source (sinbad or user), type, title, creator name only if shown, demand only if shown, likes, address and frame address, and the counts per kind.",
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "description": "popular (most liked first) or latest.",
            "schema": {
              "type": "string",
              "enum": [
                "popular",
                "latest"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Only this kind: app, site, game, doc, deck, image, video, 3d or audio.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "At most this many (1 to 100).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The pieces, each with id, source (sinbad or user), type, title, creator name only if shown, demand only if shown, likes, address and frame address, and the counts per kind.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "items",
                    "total"
                  ],
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/totals": {
      "get": {
        "summary": "Totals over everyone using Sinbad, for the front page.",
        "description": "Counts of completed runs and the like, only those with enough behind them to say.",
        "responses": {
          "200": {
            "description": "Counts of completed runs and the like, only those with enough behind them to say.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "summary": "Whether the server is up, which build it serves, and the current plans.",
        "description": "ok, the build id, the plans and limits, any notice to show, and whether the terms are in force. When you are signed in it also describes your account.",
        "responses": {
          "200": {
            "description": "ok, the build id, the plans and limits, any notice to show, and whether the terms are in force. When you are signed in it also describes your account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "ok",
                    "build",
                    "plans"
                  ],
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-protected-resource/mcp": {
      "get": {
        "summary": "How a tool signs a person in to the MCP server.",
        "description": "The OAuth protected-resource document (RFC 9728) for the MCP address.",
        "responses": {
          "200": {
            "description": "The OAuth protected-resource document (RFC 9728) for the MCP address.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "resource",
                    "authorization_servers"
                  ],
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/oauth-authorization-server": {
      "get": {
        "summary": "Where to send the person, and where to get tokens.",
        "description": "The OAuth authorization-server document (RFC 8414).",
        "responses": {
          "200": {
            "description": "The OAuth authorization-server document (RFC 8414).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "issuer",
                    "token_endpoint"
                  ],
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "summary": "Sinbad as an MCP server (Streamable HTTP, one JSON-RPC message per request).",
        "description": "Work with a person's workspaces and workstreams: workspaces, workstreams, workstream, read_file, status (key level read), write_file, new_workstream (write), demand, stop (run). Speaks the stateless form (2026-07-28) and the handshake form (2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05). See https://tidal-ai.space/docs/mcp-reference.",
        "security": [
          {
            "accessKey": []
          },
          {
            "oauth": [
              "tidal:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "const": "2.0"
                  },
                  "id": {
                    "type": [
                      "integer",
                      "string"
                    ]
                  },
                  "method": {
                    "type": "string",
                    "examples": [
                      "initialize",
                      "tools/list",
                      "tools/call",
                      "server/discover",
                      "ping"
                    ]
                  },
                  "params": {
                    "type": "object"
                  }
                }
              },
              "example": {
                "jsonrpc": "2.0",
                "id": 1,
                "method": "tools/call",
                "params": {
                  "name": "workspaces",
                  "arguments": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "One JSON-RPC response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "jsonrpc"
                  ],
                  "properties": {
                    "jsonrpc": {
                      "const": "2.0"
                    },
                    "id": {},
                    "result": {
                      "type": "object"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "202": {
            "description": "A notification was taken; nothing to answer."
          },
          "400": {
            "description": "Not JSON, not a JSON-RPC request, a batch, or headers that disagree with the body."
          },
          "401": {
            "description": "No key, or one that is wrong, taken back or run out. WWW-Authenticate says where to sign in."
          },
          "403": {
            "description": "The request came from a web page that is not Sinbad's own."
          },
          "405": {
            "description": "Not a POST."
          },
          "429": {
            "description": "Too many requests from this key."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "accessKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "tdl_<12 hex>_<40 hex>",
        "description": "A key made under Account, then Connect other tools."
      },
      "oauth": {
        "type": "oauth2",
        "description": "OAuth 2.1 with PKCE; a tool finds the endpoints from the 401 of /mcp.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://tidal-ai.space/oauth/authorize",
            "tokenUrl": "https://tidal-ai.space/oauth/token",
            "scopes": {
              "tidal:read": "Look at workspaces, workstreams and files.",
              "tidal:write": "Also change files and start workstreams.",
              "tidal:run": "Also give workstreams demands, which spend credits."
            }
          }
        }
      }
    }
  }
}