{
  "openapi": "3.1.0",
  "info": {
    "title": "A47 Media API",
    "version": "1.0.0",
    "summary": "Make on-brand AI video, images, voiceovers, sound and video ads from code.",
    "description": "The A47 Media API runs the same tools as the A47 MCP server, one POST endpoint per tool, with the same keys, quotes and charges. Every file uses the account’s weekly usage, counted in US dollars. Tools that quote first (videos, ads, checks) answer with a price; call them again with confirmedUsageCents to start. Pass the same idempotencyKey when retrying a start, so a retry never charges twice. Each key can make 60 calls a minute. Errors are JSON: { \"error\": { \"code\", \"message\", \"hint\", \"docs\" } }.",
    "termsOfService": "https://a47media.com/terms-of-service",
    "contact": {
      "name": "A47 Media",
      "url": "https://a47media.com/contact"
    }
  },
  "externalDocs": {
    "description": "A47 Media API and MCP for Developers",
    "url": "https://a47media.com/developers#api"
  },
  "servers": [
    {
      "url": "https://a47media.com",
      "description": "A47 Media"
    }
  ],
  "security": [
    {
      "apiKey": []
    },
    {
      "oauth2": [
        "media:read"
      ]
    }
  ],
  "tags": [
    {
      "name": "Make files"
    },
    {
      "name": "Make ads"
    },
    {
      "name": "Brand"
    },
    {
      "name": "Library and account"
    }
  ],
  "paths": {
    "/api/v1/tools/start_video": {
      "post": {
        "operationId": "start_video",
        "summary": "Start a video",
        "description": "A prompt alone is Kling 3.0, 3s, 720p, 16:9, silent. Uses $0.62 of usage. Any other option needs confirmedUsageCents. workspaceId files it under that brand, where it can be posted; with several brands and none named, it asks which. Can use the account’s usage, so it needs the media:write scope.",
        "tags": [
          "Make files"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read",
              "media:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The start_video arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000
                  },
                  "model": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "duration": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30
                  },
                  "ratio": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "resolution": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10
                  },
                  "generateAudio": {
                    "type": "boolean"
                  },
                  "negativePrompt": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "confirmedUsageCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "references": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "first_frame",
                            "last_frame",
                            "reference_image",
                            "reference_video",
                            "reference_audio"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "role"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200,
                    "pattern": "^[A-Za-z0-9_.:-]+$"
                  },
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "library": {
                    "type": "boolean"
                  },
                  "planId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "prompt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What start_video answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/estimate_video_cost": {
      "post": {
        "operationId": "estimate_video_cost",
        "summary": "Estimate video cost",
        "description": "Quotes one video in one line and returns confirmedUsageCents. Free.",
        "tags": [
          "Make files"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The estimate_video_cost arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 5000
                  },
                  "model": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "duration": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 30
                  },
                  "ratio": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "resolution": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 10
                  },
                  "generateAudio": {
                    "type": "boolean"
                  },
                  "negativePrompt": {
                    "type": "string",
                    "maxLength": 500
                  },
                  "confirmedUsageCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "references": {
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "first_frame",
                            "last_frame",
                            "reference_image",
                            "reference_video",
                            "reference_audio"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "role"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200,
                    "pattern": "^[A-Za-z0-9_.:-]+$"
                  }
                },
                "required": [
                  "prompt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What estimate_video_cost answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/list_video_models": {
      "post": {
        "operationId": "list_video_models",
        "summary": "List video models",
        "description": "Lists video models. Free. A plain video request does not need this list.",
        "tags": [
          "Make files"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The list_video_models arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What list_video_models answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/start_image": {
      "post": {
        "operationId": "start_image",
        "summary": "Start an image",
        "description": "Makes one image. A prompt alone uses the usual picture. Uses about $0.14 of usage (High quality holds up to $1.02; what it did not use comes back). Optional references are library image ids. workspaceId saves it under that brand, where it can be posted from the brand's Ads page; with several brands and none named, it asks which. Can use the account’s usage, so it needs the media:write scope.",
        "tags": [
          "Make files"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read",
              "media:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The start_image arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4000
                  },
                  "model": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "shape": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "quality": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 20
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 4
                  },
                  "references": {
                    "maxItems": 14,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200,
                    "pattern": "^[A-Za-z0-9_.:-]+$"
                  },
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "library": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "prompt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What start_image answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/start_speech": {
      "post": {
        "operationId": "start_speech",
        "summary": "Start a voice reading",
        "description": "Reads text aloud. A plain request uses Maia. One yes: pass confirmedUsageCents. The same idempotencyKey on retry returns the same reading. Can use the account’s usage, so it needs the media:write scope.",
        "tags": [
          "Make files"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read",
              "media:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The start_speech arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string"
                  },
                  "model": {
                    "type": "string"
                  },
                  "voiceId": {
                    "type": "string"
                  },
                  "confirmedUsageCents": {
                    "type": "number"
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "text"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What start_speech answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/list_voices": {
      "post": {
        "operationId": "list_voices",
        "summary": "List voices",
        "description": "Lists stock voices. Free. A plain reading uses Maia and does not need this list.",
        "tags": [
          "Make files"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The list_voices arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What list_voices answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/start_sound_scene": {
      "post": {
        "operationId": "start_sound_scene",
        "summary": "Start a sound scene",
        "description": "Starts a 5-second sound scene. Uses $0.05 of usage. Can use the account’s usage, so it needs the media:write scope.",
        "tags": [
          "Make files"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read",
              "media:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The start_sound_scene arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "prompt": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 3000
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 200,
                    "pattern": "^[A-Za-z0-9_.:-]+$"
                  }
                },
                "required": [
                  "prompt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What start_sound_scene answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/list_ad_templates": {
      "post": {
        "operationId": "list_ad_templates",
        "summary": "List ad templates",
        "description": "Lists the nine hook patterns, the ad templates (one per format, slideshow and image included) and the styles they run in, tagged by category, audience and product needs. 9:16, 15 seconds by default, 6 to 20; talking head, presenter, storytime and routine to 30. Free.",
        "tags": [
          "Make ads"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The list_ad_templates arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "goal": {
                    "type": "string",
                    "enum": [
                      "awareness",
                      "sales",
                      "leads"
                    ]
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "skincare-beauty",
                      "food-drink",
                      "fashion-footwear",
                      "any"
                    ]
                  },
                  "audience": {
                    "type": "string",
                    "enum": [
                      "cold",
                      "warm"
                    ]
                  },
                  "needs": {
                    "type": "string",
                    "enum": [
                      "show-texture",
                      "show-result",
                      "explain-it",
                      "look-good"
                    ]
                  },
                  "cast": {
                    "type": "string",
                    "enum": [
                      "none",
                      "hands only",
                      "one person",
                      "two people"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What list_ad_templates answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/plan_ad": {
      "post": {
        "operationId": "plan_ad",
        "summary": "Plan an ad",
        "description": "Turns a template, a style, a hook pattern and a short brief into a prompt, the start_video arguments (start_image for the image template) and the captions. The plan is free and starts nothing. Enhancing a video prompt is on by default: it quotes first, then charges with confirmedUsageCents (enhance: false skips it). The image template is not enhanced. Optional music names the background music: instruments, feel and tempo, never an artist or a song. Can use the account’s usage, so it needs the media:write scope.",
        "tags": [
          "Make ads"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read",
              "media:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The plan_ad arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "ad",
                      "reel"
                    ]
                  },
                  "template": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "style": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "product": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120
                  },
                  "problem": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "hook": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "offer": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "cta": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "claim": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "goal": {
                    "type": "string",
                    "enum": [
                      "awareness",
                      "sales",
                      "leads"
                    ]
                  },
                  "styleSetId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "person": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "setting": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "cast": {
                    "type": "string",
                    "enum": [
                      "none",
                      "hands only",
                      "one person",
                      "two people"
                    ]
                  },
                  "durationSec": {
                    "type": "integer",
                    "minimum": 6,
                    "maximum": 120
                  },
                  "hookPattern": {
                    "type": "string",
                    "enum": [
                      "H1",
                      "H2",
                      "H3",
                      "H4",
                      "H5",
                      "H6",
                      "H7",
                      "H8",
                      "H9"
                    ]
                  },
                  "personImage": {
                    "type": "boolean"
                  },
                  "productImage": {
                    "type": "boolean"
                  },
                  "packaging": {
                    "type": "string",
                    "enum": [
                      "pack",
                      "none"
                    ]
                  },
                  "shots": {
                    "minItems": 1,
                    "maxItems": 40,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "startSec": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 120
                        },
                        "endSec": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 120
                        },
                        "action": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 300
                        },
                        "camera": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "onScreen": {
                          "type": "string",
                          "maxLength": 120
                        },
                        "image": {
                          "type": "string",
                          "enum": [
                            "person",
                            "product"
                          ]
                        }
                      },
                      "required": [
                        "startSec",
                        "endSec",
                        "action",
                        "camera"
                      ]
                    }
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "skincare-beauty",
                      "food-drink",
                      "fashion-footwear",
                      "any"
                    ]
                  },
                  "promise": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "rehook": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "send": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "music": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "enhance": {
                    "type": "boolean"
                  },
                  "quoteId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "confirmedUsageCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "template",
                  "product",
                  "goal"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What plan_ad answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/make_ad": {
      "post": {
        "operationId": "make_ad",
        "summary": "Make an ad",
        "description": "Makes one Seedance 2.5 ad from a product link, or three. 9:16, 15 seconds unless you name a length from 6 to 30. Optional template and style, the same names as plan_ad. Footwear and apparel default to reveal. Skincare and beauty default to talking head. One quote names the product, the image, the template, each ad’s opening line in your brand’s voice, and its on-screen lines from the product page. Pass confirmedUsageCents, quoteRef and the same hooks and benefits to start, or your own line in hooks to change it. Optional offer, word for word, goes on the ad and its end card; pass the same offer with the yes. Saves to your library. When the automatic check is on, each ad is then checked at no charge; get_generation_link shows the result. Nothing is posted. Can use the account’s usage, so it needs the media:write scope.",
        "tags": [
          "Make ads"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read",
              "media:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The make_ad arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "productUrl": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 2000
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3
                  },
                  "durationSec": {
                    "type": "integer",
                    "minimum": 6,
                    "maximum": 30
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "ad",
                      "reel"
                    ]
                  },
                  "template": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "style": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 40
                  },
                  "confirmedUsageCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "idempotencyKey": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 180,
                    "pattern": "^[A-Za-z0-9_.:-]+$"
                  },
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "hooks": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "quoteRef": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{16}(?:[0-9a-f]{8})?$"
                  },
                  "benefits": {
                    "minItems": 1,
                    "maxItems": 3,
                    "type": "array",
                    "items": {
                      "maxItems": 2,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      }
                    }
                  },
                  "offer": {
                    "description": "The offer, word for word as the person gave it (for example \"20% off this week\"). It goes on the ad and its end card. Never make one up; leave it out when they gave none.",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 90
                  }
                },
                "required": [
                  "productUrl"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What make_ad answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/check_ad": {
      "post": {
        "operationId": "check_ad",
        "summary": "Check an ad",
        "description": "Checks an ad in your library before you post it: brand, hook, offer, call to action, length, captions, payoff, sound and AI-video mistakes, with one short fix for each miss. Pass mediaId, the id from make_ad or list_library_links. The first call quotes and holds up to $0.68. Pass that quoteId to run it. What it did not use comes back. A brand with no saved rules is skipped. Can use the account’s usage, so it needs the media:write scope.",
        "tags": [
          "Make ads"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read",
              "media:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The check_ad arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "adId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "mediaId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "platform": {
                    "type": "string",
                    "enum": [
                      "tiktok",
                      "reels",
                      "shorts",
                      "meta_feed"
                    ]
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "ad",
                      "reel"
                    ]
                  },
                  "confirmedUsageCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "quoteId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What check_ad answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/resize_ad": {
      "post": {
        "operationId": "resize_ad",
        "summary": "Resize an ad",
        "description": "Reframes or sharpens an ad from make_ad. 9:16, 1:1, 16:9 or 4:5, and 1080p when you ask to upscale. An explicit shape is up to 10 seconds. With no options, a longer clip is sharpened (up to 60.5 seconds). One quote. Pass quoteId and confirmedUsageCents to start. Saves to your library. Nothing is posted. Can use the account’s usage, so it needs the media:write scope.",
        "tags": [
          "Make ads"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read",
              "media:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The resize_ad arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mediaId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "aspectRatio": {
                    "type": "string",
                    "enum": [
                      "9:16",
                      "1:1",
                      "16:9",
                      "4:5"
                    ]
                  },
                  "upscale": {
                    "type": "boolean"
                  },
                  "confirmedUsageCents": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  },
                  "quoteId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What resize_ad answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/my_brand": {
      "post": {
        "operationId": "my_brand",
        "summary": "My brand",
        "description": "Reads this account's colours, logo, fonts, voice and chosen style. Pass colors, logoUrl or voice to change those. With a brand's workspaceId it also lists and adds that brand's photos, reads and sets its narrator, reel look and ad music (adMusic: instruments, feel and tempo, never an artist or a song), and shows its rules and writing limits: its owner marks the rules checked and agrees the limits. fileVideos moves videos, and fileImages pictures, from this library into that brand. Free.",
        "tags": [
          "Brand"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The my_brand arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "includeVoiceGuide": {
                    "type": "boolean"
                  },
                  "colors": {
                    "type": "object",
                    "properties": {
                      "primary": {
                        "type": "string"
                      },
                      "secondary": {
                        "type": "string"
                      },
                      "accent": {
                        "type": "string"
                      },
                      "background": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      }
                    }
                  },
                  "fonts": {
                    "type": "object",
                    "properties": {
                      "heading": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "body": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "accent": {
                        "type": "string",
                        "maxLength": 100
                      }
                    }
                  },
                  "logoUrl": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "addReferenceImage": {
                    "type": "object",
                    "properties": {
                      "url": {
                        "type": "string",
                        "maxLength": 2000
                      },
                      "referenceChoice": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "photoToken": {
                        "type": "string",
                        "maxLength": 4000
                      }
                    }
                  },
                  "narrator": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "reelLook": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "carouselStyle": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "adMusic": {
                    "type": "string",
                    "maxLength": 300
                  },
                  "includeRules": {
                    "type": "boolean"
                  },
                  "checkRules": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 9007199254740991
                  },
                  "writingLimits": {
                    "type": "object",
                    "properties": {
                      "agree": {
                        "type": "boolean",
                        "const": true
                      },
                      "limitsBasis": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxSentenceWords": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "maxParagraphSentences": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "maxParagraphWords": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "forbidBodyQuestions": {
                        "type": "boolean"
                      },
                      "forbidBodyExclamations": {
                        "type": "boolean"
                      },
                      "openingSummaryEnabled": {
                        "type": "boolean"
                      },
                      "openingSummaryBulletCount": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "openingSummaryMaxWordsPerBullet": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "researchPosture": {
                        "type": "string",
                        "enum": [
                          "evergreen",
                          "current_news"
                        ]
                      },
                      "articleMinWords": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "articleMaxWords": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "agree",
                      "limitsBasis"
                    ]
                  },
                  "fileVideos": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "fileImages": {
                    "minItems": 1,
                    "maxItems": 10,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "voice": {
                    "type": "string",
                    "maxLength": 5000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What my_brand answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/list_library_links": {
      "post": {
        "operationId": "list_library_links",
        "summary": "List library links",
        "description": "Links to your newest images, videos and voice files. Free.",
        "tags": [
          "Library and account"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The list_library_links arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "image",
                      "video",
                      "voice"
                    ]
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What list_library_links answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/get_generation_link": {
      "post": {
        "operationId": "get_generation_link",
        "summary": "Get generation link",
        "description": "The link to one image, video or voice clip. Free.",
        "tags": [
          "Library and account"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The get_generation_link arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "image",
                      "video",
                      "voice"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "kind",
                  "id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What get_generation_link answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/get_video_job_link": {
      "post": {
        "operationId": "get_video_job_link",
        "summary": "Get video job link",
        "description": "The link to a video once it is ready. Free.",
        "tags": [
          "Library and account"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The get_video_job_link arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What get_video_job_link answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/get_sound_scene_link": {
      "post": {
        "operationId": "get_sound_scene_link",
        "summary": "Get sound scene link",
        "description": "The link to a sound scene once it is ready. Free.",
        "tags": [
          "Library and account"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The get_sound_scene_link arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What get_sound_scene_link answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/cancel_generation": {
      "post": {
        "operationId": "cancel_generation",
        "summary": "Cancel a generation",
        "description": "Cancels the only unfinished job, or the job id you pass. If several are unfinished, it names them and cancels none. A job that never started returns the usage. A job that already started is left to finish. A job that has gone on too long can be stopped, and the usage stays. Can use the account’s usage, so it needs the media:write scope.",
        "tags": [
          "Library and account"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read",
              "media:write"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The cancel_generation arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What cancel_generation answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/usage_left": {
      "post": {
        "operationId": "usage_left",
        "summary": "Usage left",
        "description": "How much usage this account has left this week, and how much it has used. Free. This account only.",
        "tags": [
          "Library and account"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The usage_left arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What usage_left answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/list_workspaces": {
      "post": {
        "operationId": "list_workspaces",
        "summary": "List workspaces",
        "description": "Lists the workspaces on this account: id, name, timezone, live, onboarded (all four Brand Setup parts set, with any missing ones named) and a link to open each one. Free. Leave workspace_id out of a tool when this account has one workspace, or one personal workspace.",
        "tags": [
          "Library and account"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The list_workspaces arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What list_workspaces answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/add_brand": {
      "post": {
        "operationId": "add_brand",
        "summary": "Add a brand",
        "description": "Sets up another brand from its website, so each client keeps its own look and voice.",
        "tags": [
          "Brand"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The add_brand arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80
                  },
                  "website": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "client",
                      "test"
                    ]
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What add_brand answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/set_up_brand_voice": {
      "post": {
        "operationId": "set_up_brand_voice",
        "summary": "Set up a brand voice",
        "description": "Writes and saves a brand’s written voice.",
        "tags": [
          "Brand"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The set_up_brand_voice arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "link": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "brandBook": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "answers": {
                    "type": "object",
                    "properties": {
                      "audience": {
                        "type": "string",
                        "maxLength": 600
                      },
                      "sound": {
                        "type": "string",
                        "maxLength": 600
                      },
                      "avoid": {
                        "type": "string",
                        "maxLength": 600
                      }
                    }
                  },
                  "approveVersionId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "revisedGuide": {
                    "type": "string",
                    "maxLength": 60000
                  },
                  "baseVersionNumber": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "workspaceId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What set_up_brand_voice answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/api/v1/tools/archive_brand": {
      "post": {
        "operationId": "archive_brand",
        "summary": "Archive a brand",
        "description": "Archives a brand that is no longer used.",
        "tags": [
          "Brand"
        ],
        "security": [
          {
            "apiKey": []
          },
          {
            "oauth2": [
              "media:read"
            ]
          }
        ],
        "requestBody": {
          "required": true,
          "description": "The archive_brand arguments. Send {} when there are none.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "confirm": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "workspaceId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "What archive_brand answered.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/ToolError"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "502": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "A personal a47_live_ key from Settings → API & MCP, sent as Authorization: Bearer <key>. It can read and spend."
      },
      "oauth2": {
        "type": "oauth2",
        "description": "Sign in on A47 (used by Claude.ai and ChatGPT). Clients register at /oauth/mcp/register.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://a47media.com/oauth/mcp/authorize",
            "tokenUrl": "https://a47media.com/oauth/mcp/token",
            "scopes": {
              "media:read": "View media and account details",
              "media:write": "Create media (uses usage)"
            }
          }
        }
      }
    },
    "schemas": {
      "ToolResult": {
        "type": "object",
        "required": [
          "tool",
          "text",
          "content"
        ],
        "properties": {
          "tool": {
            "type": "string",
            "description": "The tool that answered."
          },
          "text": {
            "type": "string",
            "description": "The answer as plain text: links, ids, prices and next steps."
          },
          "content": {
            "type": "array",
            "description": "The MCP content blocks: text, and image or audio previews where the tool returns them.",
            "items": {
              "$ref": "#/components/schemas/ContentBlock"
            }
          },
          "structuredContent": {
            "type": "object",
            "additionalProperties": true,
            "description": "Machine-readable fields, when the tool returns them."
          }
        }
      },
      "ContentBlock": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "audio",
              "resource",
              "resource_link"
            ]
          },
          "text": {
            "type": "string"
          },
          "mimeType": {
            "type": "string"
          },
          "data": {
            "type": "string",
            "description": "Base64 data for an image or audio preview."
          },
          "uri": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "hint",
              "docs"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "not_found",
                  "method_not_allowed",
                  "unauthorized",
                  "invalid_token",
                  "insufficient_scope",
                  "tool_not_allowed",
                  "unknown_tool",
                  "invalid_body",
                  "invalid_arguments",
                  "tool_error",
                  "rate_limited",
                  "server_error"
                ],
                "description": "Stable, machine-readable error code."
              },
              "message": {
                "type": "string",
                "description": "What went wrong."
              },
              "hint": {
                "type": "string",
                "description": "What to do next."
              },
              "docs": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "tool": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContentBlock"
            }
          }
        }
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The body is not a JSON object, or the arguments do not match the schema (invalid_body, invalid_arguments).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "No key, or the key was not accepted (unauthorized, invalid_token).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Forbidden": {
        "description": "The token cannot spend usage, or the tool is not open to this account (insufficient_scope, tool_not_allowed).",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ToolError": {
        "description": "The tool ran and refused or failed, for example not enough usage left (tool_error). The message says what to change.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "RateLimited": {
        "description": "More than 60 calls in a minute with this key (rate_limited).",
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait.",
            "schema": {
              "type": "integer"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "ServerError": {
        "description": "The tool could not be run (server_error). Try again in a minute.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}
