AI Photo Studio MCP API

Hosted Model Context Protocol server and its OAuth 2.1 authorization endpoints.

GitHub OpenAPI

Operations 5

POST /api/mcp Hosted MCP server (Streamable HTTP) #
GET /.well-known/oauth-protected-resource OAuth 2.0 Protected Resource Metadata (RFC 9728) #
GET /.well-known/oauth-authorization-server OAuth 2.0 Authorization Server Metadata (RFC 8414) #
POST /api/oauth/register Dynamic Client Registration (RFC 7591) #
POST /api/oauth/token Exchange an authorization code or refresh an access token #

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/photoaistudio-com:photoaistudio-com-mcp-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

photoaistudio-com-mcp-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Photo AI Studio Agent MCP API
  version: 1.0.0
  summary: Generate professional AI photos, edit images, and create video from a selfie — programmatically.
  description: 'Machine-readable API surface for AI agents. Public discovery endpoints (capabilities, themes, products) require no authentication; generation and account endpoints use a Bearer token plus an X-Buyer-Email header identifying the end user. Also reachable over the Model Context Protocol at /api/mcp (manifest at /.well-known/mcp) and, for interactive checkout, the agentic-commerce endpoints under /api/commerce. Credits are the unit of spend (100 credits = 1 photo); prices and packages are in the product feed and at /pricing.


    Versioning: this is v1. Send an optional `API-Version` request header (date- or number-based, e.g. `2026-08-25` or `1`) to pin behavior; without it, the current stable version is used. Breaking changes ship under a new version value and, where structural, a new `/vN/` path.


    Deprecation & sunset policy: a version is supported for at least 6 months after its successor ships. When an endpoint or version is deprecated it returns a `Deprecation: true` header and a `Sunset: ` header (RFC 8594) giving the earliest removal date, plus a `Link` header with `rel="deprecation"` pointing to migration docs. Removal never happens before the advertised Sunset date.'
  x-sunset-policy:
    minSupportWindowMonths: 6
    deprecationHeader: Deprecation
    sunsetHeader: Sunset
    docs: https://www.photoaistudio.com/for-developers
  contact:
    name: Photo AI Studio Support
    email: contact@photoaistudio.com
    url: https://www.photoaistudio.com/contact
  termsOfService: https://www.photoaistudio.com/terms-conditions
  license:
    name: Proprietary
    url: https://www.photoaistudio.com/terms-conditions
servers:
- url: https://www.photoaistudio.com
  description: Production (v1)
security:
- bearerAuth: []
  buyerEmail: []
tags:
- name: MCP
  description: Hosted Model Context Protocol server and its OAuth 2.1 authorization endpoints.
paths:
  /api/mcp:
    post:
      tags:
      - MCP
      operationId: mcpJsonRpc
      summary: Hosted MCP server (Streamable HTTP)
      description: 'JSON-RPC 2.0 endpoint implementing the Model Context Protocol over Streamable HTTP. Stateless: every POST carries a complete request and receives a single JSON response. Anonymous callers can list tools and use the four discovery tools. Tools that touch an account answer 401 with a WWW-Authenticate header naming /.well-known/oauth-protected-resource, which starts the OAuth 2.1 flow. A per-user API key works as a bearer token as well.'
      security:
      - {}
      - bearerAuth: []
      - oauth2:
        - photos:read
        - photos:write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - jsonrpc
              - method
              properties:
                jsonrpc:
                  type: string
                  enum:
                  - '2.0'
                id:
                  description: Request id. Omit for notifications.
                method:
                  type: string
                  description: MCP method, for example initialize, tools/list, or tools/call.
                params:
                  type: object
                  additionalProperties: true
            example:
              jsonrpc: '2.0'
              id: 1
              method: tools/list
              params: {}
      responses:
        '200':
          description: JSON-RPC response
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id: {}
                  result:
                    type: object
                    additionalProperties: true
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
        '401':
          description: The tool needs a connected account. The WWW-Authenticate header names the protected resource metadata document.
          headers:
            WWW-Authenticate:
              schema:
                type: string
              description: Bearer resource_metadata="https://www.photoaistudio.com/.well-known/oauth-protected-resource"
          content:
            application/json:
              schema:
                type: object
        '403':
          description: The token lacks the scope this tool requires.
        '429':
          description: Rate limit exceeded. The body is a JSON-RPC error; Retry-After gives the wait in seconds.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id: {}
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
        '405':
          description: Only POST carries JSON-RPC. GET and DELETE return this because the server is stateless.
  /.well-known/oauth-protected-resource:
    get:
      tags:
      - MCP
      operationId: oauthProtectedResourceMetadata
      summary: OAuth 2.0 Protected Resource Metadata (RFC 9728)
      description: Tells an MCP client which authorization server guards /api/mcp. Also served at /.well-known/oauth-protected-resource/api/mcp.
      security:
      - {}
      responses:
        '200':
          description: Protected resource metadata
          content:
            application/json:
              schema:
                type: object
  /.well-known/oauth-authorization-server:
    get:
      tags:
      - MCP
      operationId: oauthAuthorizationServerMetadata
      summary: OAuth 2.0 Authorization Server Metadata (RFC 8414)
      security:
      - {}
      responses:
        '200':
          description: Authorization server metadata
          content:
            application/json:
              schema:
                type: object
  /api/oauth/register:
    post:
      tags:
      - MCP
      operationId: oauthRegisterClient
      summary: Dynamic Client Registration (RFC 7591)
      description: Registers a public client and returns a client_id. No credential required, as the RFC specifies. Registration grants no access on its own.
      security:
      - {}
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - redirect_uris
              properties:
                redirect_uris:
                  type: array
                  items:
                    type: string
                client_name:
                  type: string
                client_uri:
                  type: string
                scope:
                  type: string
                grant_types:
                  type: array
                  items:
                    type: string
      responses:
        '201':
          description: Registered client
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid client metadata or redirect URI
        '429':
          description: Too many registrations from this address
  /api/oauth/token:
    post:
      tags:
      - MCP
      operationId: oauthToken
      summary: Exchange an authorization code or refresh an access token
      description: 'OAuth 2.1 token endpoint. Public clients only: PKCE with S256 replaces the client secret, and refresh tokens rotate on every use.'
      security:
      - {}
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - grant_type
              properties:
                grant_type:
                  type: string
                  enum:
                  - authorization_code
                  - refresh_token
                code:
                  type: string
                code_verifier:
                  type: string
                redirect_uri:
                  type: string
                refresh_token:
                  type: string
                client_id:
                  type: string
                scope:
                  type: string
      responses:
        '200':
          description: Token response
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                  token_type:
                    type: string
                  expires_in:
                    type: integer
                  refresh_token:
                    type: string
                  scope:
                    type: string
        '400':
          description: invalid_grant, invalid_request, or unsupported_grant_type
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Bearer credential. Use a per-user API key (pa_sk_) created at https://www.photoaistudio.com/api-keys, an OAuth 2.1 access token (pa_at_) from /api/oauth/token, or a shared partner token together with X-Buyer-Email. Send as: Authorization: Bearer <token>.'
    buyerEmail:
      type: apiKey
      in: header
      name: X-Buyer-Email
      description: Email of the end user the agent is acting for. Users are auto-created.
    oauth2:
      type: oauth2
      description: OAuth 2.1 authorization code flow with PKCE. Used by remote MCP clients. Discover the endpoints at /.well-known/oauth-authorization-server and the protected resource at /.well-known/oauth-protected-resource.
      flows:
        authorizationCode:
          authorizationUrl: https://www.photoaistudio.com/api/oauth/authorize
          tokenUrl: https://www.photoaistudio.com/api/oauth/token
          refreshUrl: https://www.photoaistudio.com/api/oauth/token
          scopes:
            photos:read: Read the account, credit balance, themes, and past generations.
            photos:write: Upload images and spend credits on photos, edits, and videos.
externalDocs:
  description: Developer guide, llms.txt, and MCP server
  url: https://www.photoaistudio.com/for-developers