{
  "openapi": "3.1.0",
  "info": {
    "title": "PicYep MCP",
    "version": "0.3.0",
    "summary": "Realistic photos and video of real people, pets and products, from a sentence or from your own photos, inside your AI assistant. One account, with no provider keys.",
    "description": "PicYep is a remote Model Context Protocol server, not a resource-oriented REST API. Sign in with OAuth 2.1 (authorization code and PKCE S256), then send JSON-RPC 2.0 by POST. tools/list has the live schemas. A photo or video is a job: generate_image returns a job_id, and check_job returns the result."
  },
  "servers": [
    {
      "url": "https://picyep.com"
    }
  ],
  "paths": {
    "/mcp": {
      "post": {
        "summary": "The server for general MCP clients.",
        "security": [
          {
            "oauth": [
              "photos"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A JSON-RPC 2.0 answer.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "No valid token. WWW-Authenticate says where to find out how to sign in."
          }
        }
      }
    },
    "/mcp/chatgpt": {
      "post": {
        "summary": "The server for ChatGPT.",
        "security": [
          {
            "oauth": [
              "photos"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A JSON-RPC 2.0 answer.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "No valid token. WWW-Authenticate says where to find out how to sign in."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "oauth": {
        "type": "oauth2",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://picyep.com/api/auth/oauth2/authorize",
            "tokenUrl": "https://picyep.com/api/auth/oauth2/token",
            "refreshUrl": "https://picyep.com/api/auth/oauth2/token",
            "scopes": {
              "photos": "See the balance and models, make photos with the account’s credits, and use photos added through a link.",
              "library": "See, change and delete saved photos, people and albums, and make public links to photos.",
              "offline_access": "Stay connected until disconnected."
            }
          }
        }
      }
    },
    "schemas": {
      "JsonRpcRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "number"
            ]
          },
          "method": {
            "type": "string",
            "examples": [
              "initialize",
              "tools/list",
              "tools/call"
            ]
          },
          "params": {
            "type": "object"
          }
        }
      }
    }
  }
}