{
  "openapi": "3.1.0",
  "info": {
    "title": "Framera API",
    "version": "1.0.0",
    "description": "Finished AI films, talking avatars, UGC ads, images, audio and swaps from one API. Pay per request from a prepaid balance.\n\n**Authentication.** Send your API key on every request as `Authorization: Bearer fr_live_…`. Create keys in the developer console at https://developer.framera.ai. Keys are for server-to-server use only; never put one in a browser or app.\n\n**How a request works.** Every create (`POST /v1/videos`, `/v1/images`, …) is priced, the price is held from your balance, and it is charged only if the job succeeds. Get exact prices first with `POST /v1/quotes`; `GET /v1/models` lists the models, their settings and live prices. Creates answer `201` with a job; poll `GET /v1/jobs/{id}` or receive signed webhooks.\n\n**Idempotency.** Send an `Idempotency-Key` header on creates; a retry with the same key and body returns the first job instead of starting a second.\n\n**Rate limits.** 120 requests a minute per key and 20 creates a minute per key; responses carry `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`.\n\n**Errors** are `{ \"error\": { \"code\", \"message\", \"details\" } }`.",
    "termsOfService": "https://framera.ai/legal/terms",
    "contact": {
      "name": "Framera AI",
      "url": "https://developer.framera.ai",
      "email": "hello@framera.ai"
    }
  },
  "servers": [
    {
      "url": "https://api.framera.ai",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Models",
      "description": "What you can make, in which settings, at which price."
    },
    {
      "name": "Quotes",
      "description": "Exact prices before you create anything."
    },
    {
      "name": "Videos",
      "description": "Finished Odyssey films from text, and videos from a picture."
    },
    {
      "name": "Avatars",
      "description": "Talking avatars from a photo."
    },
    {
      "name": "UGC",
      "description": "UGC-style product ads."
    },
    {
      "name": "Images",
      "description": "Images from a prompt."
    },
    {
      "name": "Tools",
      "description": "Upscale, remove background, inpaint."
    },
    {
      "name": "Audio",
      "description": "Text to speech, voice change, translation."
    },
    {
      "name": "Swap",
      "description": "Put a person from a photo into a clip."
    },
    {
      "name": "Uploads",
      "description": "Send your own files."
    },
    {
      "name": "Jobs",
      "description": "Status, results and cancelling."
    },
    {
      "name": "Balance",
      "description": "Your prepaid balance."
    },
    {
      "name": "Webhooks",
      "description": "Signed event deliveries to your server."
    },
    {
      "name": "Events",
      "description": "Everything that happened on your account."
    }
  ],
  "externalDocs": {
    "description": "Framera developer docs",
    "url": "https://developer.framera.ai/docs"
  },
  "paths": {
    "/v1/models": {
      "get": {
        "operationId": "listModels",
        "tags": [
          "Models"
        ],
        "summary": "List models",
        "description": "What you can make, in which settings, and the live price list for each model. Voices and languages for audio are listed here too.",
        "responses": {
          "200": {
            "description": "Every product's models.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/quotes": {
      "post": {
        "operationId": "createQuote",
        "tags": [
          "Quotes"
        ],
        "summary": "Price a request",
        "description": "The exact price of a create body. Nothing is started or charged; files are measured, not kept.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              },
              "examples": {
                "video": {
                  "summary": "A 30-second film",
                  "value": {
                    "product": "video",
                    "body": {
                      "prompt": "A candlelit tea room at sunset, soft piano",
                      "durationSeconds": 30,
                      "resolution": "1080p"
                    }
                  }
                },
                "speech": {
                  "summary": "Speech",
                  "value": {
                    "product": "audio",
                    "operation": "speech",
                    "body": {
                      "text": "Welcome to the tea room. Tonight we pour a smoky lapsang by candlelight."
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The price.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Quote"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/quotes/video": {
      "post": {
        "operationId": "createVideoQuote",
        "tags": [
          "Quotes"
        ],
        "summary": "Price a film (first version)",
        "deprecated": true,
        "description": "Kept from the first version of the API for code written against it. Use `POST /v1/quotes` with `product: \"video\"`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LegacyVideoQuoteRequest"
              },
              "example": {
                "durationSeconds": 30,
                "resolution": "1080p",
                "sound": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The price.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyQuote"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/quotes/image": {
      "post": {
        "operationId": "createImageQuote",
        "tags": [
          "Quotes"
        ],
        "summary": "Price an image request (first version)",
        "deprecated": true,
        "description": "Kept from the first version of the API for code written against it. Use `POST /v1/quotes` with `product: \"image\"`.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LegacyImageQuoteRequest"
              },
              "example": {
                "model": "nano-banana-pro",
                "size": "2k",
                "count": 2
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The price.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyQuote"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/videos": {
      "post": {
        "operationId": "createVideo",
        "tags": [
          "Videos"
        ],
        "summary": "Create a film",
        "description": "A finished Odyssey film from text, with dialogue, sound and music, or a video from a picture when you send `image`.\n\nThe price is fixed and held from your balance when the job is created, and charged only if it succeeds. Poll `GET /v1/jobs/{id}`, or pass `webhookUrl`, to get the result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVideoRequest"
              },
              "example": {
                "model": "odyssey-1-ultra",
                "prompt": "A candlelit tea room at sunset, soft piano",
                "durationSeconds": 30,
                "resolution": "1080p",
                "aspectRatio": "16:9",
                "sound": true,
                "webhookUrl": "https://yourapp.com/hooks/framera",
                "metadata": {
                  "orderId": "1042"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A replay: the job first created with this `Idempotency-Key` and body.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "201": {
            "description": "The job, created (`status: \"queued\"`).",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ContentRefused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/avatars": {
      "post": {
        "operationId": "createAvatar",
        "tags": [
          "Avatars"
        ],
        "summary": "Create a talking avatar",
        "description": "A talking avatar video from one photo and a script (spoken in a voice) or your own recording.\n\nThe price is fixed and held from your balance when the job is created, and charged only if it succeeds. Poll `GET /v1/jobs/{id}`, or pass `webhookUrl`, to get the result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAvatarRequest"
              },
              "example": {
                "image": "https://yourshop.com/img/host.jpg",
                "script": "Welcome to the tea room. Tonight we pour a smoky lapsang by candlelight.",
                "voice": "English_expressive_narrator",
                "resolution": "1080p",
                "metadata": {
                  "orderId": "1042"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A replay: the job first created with this `Idempotency-Key` and body.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "201": {
            "description": "The job, created (`status: \"queued\"`).",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ContentRefused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/ugc": {
      "post": {
        "operationId": "createUgc",
        "tags": [
          "UGC"
        ],
        "summary": "Create a UGC ad",
        "description": "A short UGC-style product ad. We write the script when you leave `script` out.\n\nThe price is fixed and held from your balance when the job is created, and charged only if it succeeds. Poll `GET /v1/jobs/{id}`, or pass `webhookUrl`, to get the result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUgcRequest"
              },
              "example": {
                "product": {
                  "name": "Ember Lapsang Tea",
                  "description": "Smoky loose-leaf black tea, hand-rolled.",
                  "images": [
                    "https://yourshop.com/img/ember-tin.jpg"
                  ]
                },
                "brief": "Cozy evening ritual, warm and calm.",
                "avatar": "https://yourshop.com/img/creator.jpg",
                "durationSeconds": 15,
                "aspectRatio": "9:16"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A replay: the job first created with this `Idempotency-Key` and body.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "201": {
            "description": "The job, created (`status: \"queued\"`).",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ContentRefused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/images": {
      "post": {
        "operationId": "createImage",
        "tags": [
          "Images"
        ],
        "summary": "Create images",
        "description": "One to four images from a prompt, optionally following reference pictures.\n\nThe price is fixed and held from your balance when the job is created, and charged only if it succeeds. Poll `GET /v1/jobs/{id}`, or pass `webhookUrl`, to get the result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateImageRequest"
              },
              "example": {
                "model": "nano-banana-pro",
                "prompt": "A candlelit tea room at sunset, soft piano",
                "size": "2k",
                "aspectRatio": "16:9",
                "count": 2
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A replay: the job first created with this `Idempotency-Key` and body.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "201": {
            "description": "The job, created (`status: \"queued\"`).",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ContentRefused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/tools/upscale": {
      "post": {
        "operationId": "upscaleImage",
        "tags": [
          "Tools"
        ],
        "summary": "Upscale an image",
        "description": "A sharper picture at 2x or 4x the size. Priced by the output size.\n\nThe price is fixed and held from your balance when the job is created, and charged only if it succeeds. Poll `GET /v1/jobs/{id}`, or pass `webhookUrl`, to get the result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpscaleRequest"
              },
              "example": {
                "image": "https://yourshop.com/img/tea-room.jpg",
                "factor": 4
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A replay: the job first created with this `Idempotency-Key` and body.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "201": {
            "description": "The job, created (`status: \"queued\"`).",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ContentRefused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/tools/remove-background": {
      "post": {
        "operationId": "removeBackground",
        "tags": [
          "Tools"
        ],
        "summary": "Remove the background",
        "description": "The subject cut out on a transparent background.\n\nThe price is fixed and held from your balance when the job is created, and charged only if it succeeds. Poll `GET /v1/jobs/{id}`, or pass `webhookUrl`, to get the result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RemoveBackgroundRequest"
              },
              "example": {
                "image": "https://yourshop.com/img/ember-tin.jpg"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A replay: the job first created with this `Idempotency-Key` and body.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "201": {
            "description": "The job, created (`status: \"queued\"`).",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ContentRefused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/tools/inpaint": {
      "post": {
        "operationId": "inpaintImage",
        "tags": [
          "Tools"
        ],
        "summary": "Inpaint an image",
        "description": "Repaint the white area of `mask` from a prompt.\n\nThe price is fixed and held from your balance when the job is created, and charged only if it succeeds. Poll `GET /v1/jobs/{id}`, or pass `webhookUrl`, to get the result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InpaintRequest"
              },
              "example": {
                "image": "https://yourshop.com/img/tea-room.jpg",
                "mask": "https://yourshop.com/img/tea-room-mask.png",
                "prompt": "A lit candle on the table"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A replay: the job first created with this `Idempotency-Key` and body.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "201": {
            "description": "The job, created (`status: \"queued\"`).",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ContentRefused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/audio/speech": {
      "post": {
        "operationId": "createSpeech",
        "tags": [
          "Audio"
        ],
        "summary": "Text to speech",
        "description": "Speech from text in a voice from `GET /v1/models` or one of your own cloned voices.\n\nThe price is fixed and held from your balance when the job is created, and charged only if it succeeds. Poll `GET /v1/jobs/{id}`, or pass `webhookUrl`, to get the result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpeechRequest"
              },
              "example": {
                "text": "Welcome to the tea room. Tonight we pour a smoky lapsang by candlelight.",
                "voice": "English_expressive_narrator",
                "emotion": "calm"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A replay: the job first created with this `Idempotency-Key` and body.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "201": {
            "description": "The job, created (`status: \"queued\"`).",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ContentRefused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/audio/voice-change": {
      "post": {
        "operationId": "changeVoice",
        "tags": [
          "Audio"
        ],
        "summary": "Change a voice",
        "description": "A recording re-spoken in another voice.\n\nThe price is fixed and held from your balance when the job is created, and charged only if it succeeds. Poll `GET /v1/jobs/{id}`, or pass `webhookUrl`, to get the result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VoiceChangeRequest"
              },
              "example": {
                "audio": "upload_4Gh7qR2mXk9LpT3vNc8WzY1a",
                "voice": "Rachel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A replay: the job first created with this `Idempotency-Key` and body.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "201": {
            "description": "The job, created (`status: \"queued\"`).",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ContentRefused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/audio/translate": {
      "post": {
        "operationId": "translateAudio",
        "tags": [
          "Audio"
        ],
        "summary": "Translate speech",
        "description": "The speech in a recording or video, transcribed, translated and spoken in the target language. The job carries `transcript`, `translation` and `sourceLanguage`.\n\nThe price is fixed and held from your balance when the job is created, and charged only if it succeeds. Poll `GET /v1/jobs/{id}`, or pass `webhookUrl`, to get the result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TranslateRequest"
              },
              "example": {
                "audio": "https://yourshop.com/audio/welcome.mp3",
                "targetLanguage": "es"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A replay: the job first created with this `Idempotency-Key` and body.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "201": {
            "description": "The job, created (`status: \"queued\"`).",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ContentRefused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/swap": {
      "post": {
        "operationId": "createSwap",
        "tags": [
          "Swap"
        ],
        "summary": "Swap a person into a clip",
        "description": "The person in a photo put into a short video clip.\n\nThe price is fixed and held from your balance when the job is created, and charged only if it succeeds. Poll `GET /v1/jobs/{id}`, or pass `webhookUrl`, to get the result.",
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SwapRequest"
              },
              "example": {
                "video": "https://yourshop.com/video/dance.mp4",
                "image": "https://yourshop.com/img/creator.jpg"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A replay: the job first created with this `Idempotency-Key` and body.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "201": {
            "description": "The job, created (`status: \"queued\"`).",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "$ref": "#/components/responses/InsufficientBalance"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "422": {
            "$ref": "#/components/responses/ContentRefused"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/uploads": {
      "post": {
        "operationId": "createUpload",
        "tags": [
          "Uploads"
        ],
        "summary": "Upload a file",
        "description": "A signed URL to PUT one file to. Send the file bytes to `uploadUrl` with the same `Content-Type` and `Content-Length`, then use the `upload_…` id in any create body. Read-only keys cannot upload.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadRequest"
              },
              "example": {
                "filename": "tea-room.jpg",
                "contentType": "image/jpeg",
                "size": 482113
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The upload: where to PUT the file, and its id.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Upload"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/jobs": {
      "get": {
        "operationId": "listJobs",
        "tags": [
          "Jobs"
        ],
        "summary": "List jobs",
        "description": "Your API jobs, newest first.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Product"
            },
            "description": "Only jobs of this product."
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/JobStatus"
            },
            "description": "Only jobs in this status."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of jobs.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/jobs/{id}": {
      "get": {
        "operationId": "getJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Get a job",
        "description": "Status, price, echoed settings, and once it has succeeded, signed links to the files (valid for an hour).",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "The job.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/jobs/{id}/cancel": {
      "post": {
        "operationId": "cancelJob",
        "tags": [
          "Jobs"
        ],
        "summary": "Cancel a job",
        "description": "Cancels a job while it is still `queued`; the held price is released at once. A job that has started answers 409 `job_not_cancellable`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/JobId"
          }
        ],
        "responses": {
          "200": {
            "description": "The job, now `cancelled`.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "409": {
            "$ref": "#/components/responses/Conflict"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/balance": {
      "get": {
        "operationId": "getBalance",
        "tags": [
          "Balance"
        ],
        "summary": "Get your balance",
        "description": "What you can spend, what is held for running jobs, and your auto-recharge settings. Top up in the console.",
        "responses": {
          "200": {
            "description": "Your balance.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Balance"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/webhook-secret": {
      "get": {
        "operationId": "getWebhookSecret",
        "tags": [
          "Webhooks"
        ],
        "summary": "Get the account webhook secret",
        "description": "The account secret that signs deliveries to a per-request `webhookUrl`. Webhook endpoints have their own secrets.",
        "responses": {
          "200": {
            "description": "The secret.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSecret"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          },
          "503": {
            "$ref": "#/components/responses/Unavailable"
          }
        }
      }
    },
    "/v1/webhook-endpoints": {
      "post": {
        "operationId": "createWebhookEndpoint",
        "tags": [
          "Webhooks"
        ],
        "summary": "Create a webhook endpoint",
        "description": "An https URL that receives your account's events. The `secret` is in this response only (and when rolled). Up to 16 endpoints. Needs a key with the `all` permission.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookEndpointRequest"
              },
              "example": {
                "url": "https://yourapp.com/hooks/framera",
                "events": [
                  "job.succeeded",
                  "job.failed"
                ],
                "description": "Production backend"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The endpoint, with its secret.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      },
      "get": {
        "operationId": "listWebhookEndpoints",
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook endpoints",
        "description": "All your webhook endpoints, newest first, without their secrets.",
        "responses": {
          "200": {
            "description": "Your endpoints.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointList"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/webhook-endpoints/{id}": {
      "get": {
        "operationId": "getWebhookEndpoint",
        "tags": [
          "Webhooks"
        ],
        "summary": "Get a webhook endpoint",
        "parameters": [
          {
            "$ref": "#/components/parameters/EndpointId"
          }
        ],
        "description": "One endpoint, without its secret.",
        "responses": {
          "200": {
            "description": "The endpoint.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      },
      "post": {
        "operationId": "updateWebhookEndpoint",
        "tags": [
          "Webhooks"
        ],
        "summary": "Update a webhook endpoint",
        "description": "Change the URL, events or description, or disable it. Send only what changes. Needs a key with the `all` permission.",
        "parameters": [
          {
            "$ref": "#/components/parameters/EndpointId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookEndpointRequest"
              },
              "example": {
                "events": [
                  "job.succeeded"
                ],
                "disabled": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The endpoint.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      },
      "delete": {
        "operationId": "deleteWebhookEndpoint",
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete a webhook endpoint",
        "description": "Stops deliveries to it. Needs a key with the `all` permission.",
        "parameters": [
          {
            "$ref": "#/components/parameters/EndpointId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deleted.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletedWebhookEndpoint"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/webhook-endpoints/{id}/roll-secret": {
      "post": {
        "operationId": "rollWebhookEndpointSecret",
        "tags": [
          "Webhooks"
        ],
        "summary": "Roll a webhook endpoint secret",
        "description": "A new signing secret for the endpoint, returned once. The old one stops working at once. Needs a key with the `all` permission.",
        "parameters": [
          {
            "$ref": "#/components/parameters/EndpointId"
          }
        ],
        "responses": {
          "200": {
            "description": "The endpoint, with its new secret.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/events": {
      "get": {
        "operationId": "listEvents",
        "tags": [
          "Events"
        ],
        "summary": "List events",
        "description": "Your account's events, newest first: the same objects webhooks deliver.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 60
            },
            "description": "Only events of this type, such as `job.succeeded`.",
            "example": "job.succeeded"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventList"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    },
    "/v1/events/{id}": {
      "get": {
        "operationId": "getEvent",
        "tags": [
          "Events"
        ],
        "summary": "Get an event",
        "description": "One event.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "An `evt_…` id.",
            "example": "evt_8Lw2Kp4QzX7cVn1MbR9tHy3s"
          }
        ],
        "responses": {
          "200": {
            "description": "The event.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Event"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PermissionDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/RateLimited"
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        }
      }
    }
  },
  "webhooks": {
    "event": {
      "post": {
        "operationId": "receiveEvent",
        "tags": [
          "Webhooks"
        ],
        "summary": "An event delivered to your server",
        "description": "Sent to every enabled webhook endpoint that listens for the event type, and to the `webhookUrl` of the request it belongs to. The `Framera-Signature` header is `t=<unix seconds>,v1=<hex>`, where `v1` is the HMAC-SHA256 of `<t>.<raw body>` with the endpoint's secret (or the account secret from `GET /v1/webhook-secret` for a per-request `webhookUrl`). Reject timestamps older than five minutes. Answer with any 2xx. Other answers and network errors are retried after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours.",
        "parameters": [
          {
            "name": "Framera-Signature",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "t=1795969473,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Any 2xx answer marks the delivery as delivered."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "fr_live_…",
        "description": "Your API key: `Authorization: Bearer fr_live_…`. Keys match `^(aiv_|fr_live_)[A-Za-z0-9_-]{40,}$`."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Makes a create safe to retry: a repeat with the same key and body returns the first job (HTTP 200) instead of starting and charging for a second; the same key with a different body is a 409. Up to 200 characters.",
        "schema": {
          "type": "string",
          "maxLength": 200
        },
        "example": "order-1042"
      },
      "JobId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "A job id (a UUID).",
        "schema": {
          "type": "string",
          "format": "uuid"
        },
        "example": "3f6c2a1e-8b4d-4c1a-9e2f-7a5b0c9d1e42"
      },
      "EndpointId": {
        "name": "id",
        "in": "path",
        "required": true,
        "description": "A `we_…` webhook endpoint id.",
        "schema": {
          "type": "string"
        },
        "example": "we_8Lw2Hc5JtQ9mVb3XkR7pNa1d"
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Page size.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 20
        },
        "example": 20
      },
      "StartingAfter": {
        "name": "starting_after",
        "in": "query",
        "required": false,
        "description": "The last id of the previous page.",
        "schema": {
          "type": "string",
          "maxLength": 80
        }
      }
    },
    "headers": {
      "X-RateLimit-Limit": {
        "description": "Requests allowed per minute for this kind of request.",
        "schema": {
          "type": "integer"
        },
        "example": 120
      },
      "X-RateLimit-Remaining": {
        "description": "Requests left in the current window.",
        "schema": {
          "type": "integer"
        },
        "example": 119
      },
      "X-RateLimit-Reset": {
        "description": "Unix time (seconds) when a slot frees up.",
        "schema": {
          "type": "integer"
        },
        "example": 1795969533
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer"
        },
        "example": 30
      }
    },
    "responses": {
      "BadRequest": {
        "description": "`invalid_request`: the body or query failed validation, or a file could not be read.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/X-RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/X-RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/X-RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "validation": {
                "summary": "A field failed validation",
                "value": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Invalid request",
                    "details": {
                      "issues": [
                        {
                          "path": "prompt",
                          "message": "Required"
                        }
                      ]
                    }
                  }
                }
              },
              "media": {
                "summary": "A file could not be used",
                "value": {
                  "error": {
                    "code": "invalid_request",
                    "message": "image: the URL answered HTTP 404",
                    "details": {
                      "field": "image"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "`unauthorized`: no API key, an invalid or revoked key, or a browser session instead of a key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "missing": {
                "summary": "No key",
                "value": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Please sign in",
                    "details": null
                  }
                }
              },
              "invalid": {
                "summary": "Invalid or revoked key",
                "value": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Invalid or revoked API key",
                    "details": null
                  }
                }
              }
            }
          }
        }
      },
      "InsufficientBalance": {
        "description": "`insufficient_balance`: your available balance does not cover this request. `details` has `required`, `available` and `currency`. Top up at https://developer.framera.ai/console/billing.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/X-RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/X-RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/X-RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "balance": {
                "summary": "Balance too low",
                "value": {
                  "error": {
                    "code": "insufficient_balance",
                    "message": "This request costs more than your available balance. Top up at https://developer.framera.ai/console/billing",
                    "details": {
                      "currency": "usd"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "PermissionDenied": {
        "description": "`permission_denied`: the key lacks the permission, a monthly limit would be passed, or the caller's IP is not allowed. `details.reason` says which: `key_permission`, `key_monthly_limit`, `monthly_limit` or `ip_not_allowed`.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/X-RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/X-RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/X-RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "permission": {
                "summary": "Key permission",
                "value": {
                  "error": {
                    "code": "permission_denied",
                    "message": "This key can't create video jobs. Give it the \"films\" permission in the console.",
                    "details": {
                      "reason": "key_permission",
                      "needed": "films"
                    }
                  }
                }
              },
              "ip": {
                "summary": "IP not allowed",
                "value": {
                  "error": {
                    "code": "permission_denied",
                    "message": "This key is not allowed from 198.51.100.7. Add the address to the key's allowed IPs.",
                    "details": {
                      "reason": "ip_not_allowed"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "`not_found`: no such object on your account.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/X-RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/X-RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/X-RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "notFound": {
                "summary": "Not found",
                "value": {
                  "error": {
                    "code": "not_found",
                    "message": "Job not found",
                    "details": null
                  }
                }
              }
            }
          }
        }
      },
      "Conflict": {
        "description": "`idempotency_conflict` (an `Idempotency-Key` reused with a different body, or the first request with it still running) or `job_not_cancellable`.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/X-RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/X-RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/X-RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "idempotency": {
                "summary": "Idempotency conflict",
                "value": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "This Idempotency-Key was already used with a different request body",
                    "details": null
                  }
                }
              },
              "cancel": {
                "summary": "Job not cancellable",
                "value": {
                  "error": {
                    "code": "job_not_cancellable",
                    "message": "Only a queued job can be cancelled; this one is running.",
                    "details": {
                      "status": "running"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "ContentRefused": {
        "description": "`content_refused`: the request was refused by the content rules. Nothing was charged.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/X-RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/X-RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/X-RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "refused": {
                "summary": "Refused",
                "value": {
                  "error": {
                    "code": "content_refused",
                    "message": "This request was refused by the content rules.",
                    "details": null
                  }
                }
              }
            }
          }
        }
      },
      "RateLimited": {
        "description": "`rate_limited`: 120 requests a minute per key, and 20 creates a minute per key. Retry after `Retry-After` seconds.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/X-RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/X-RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/X-RateLimit-Reset"
          },
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "limited": {
                "summary": "Too many requests",
                "value": {
                  "error": {
                    "code": "rate_limited",
                    "message": "Too many requests. The limit is 120 a minute per key.",
                    "details": null
                  }
                }
              }
            }
          }
        }
      },
      "ServerError": {
        "description": "`server_error`: something went wrong on our side. Safe to retry.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/X-RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/X-RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/X-RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "server": {
                "summary": "Server error",
                "value": {
                  "error": {
                    "code": "server_error",
                    "message": "Something went wrong on our side. Please retry.",
                    "details": null
                  }
                }
              }
            }
          }
        }
      },
      "Unavailable": {
        "description": "`model_paused` (the model or tool is paused right now) or `server_error` (a dependency is unavailable). Retry later.",
        "headers": {
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/X-RateLimit-Limit"
          },
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/X-RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/X-RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "paused": {
                "summary": "Model paused",
                "value": {
                  "error": {
                    "code": "model_paused",
                    "message": "Odyssey 1 Ultra is paused right now",
                    "details": null
                  }
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "description": "Every error has this shape. Branch on `error.code`, not on the message.",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "details"
            ],
            "properties": {
              "code": {
                "type": "string",
                "description": "One of: `invalid_request`, `unauthorized`, `insufficient_balance`, `permission_denied`, `not_found`, `idempotency_conflict`, `job_not_cancellable`, `content_refused`, `rate_limited`, `model_paused`, `server_error`. New codes may be added; treat unknown ones by their HTTP status.",
                "example": "invalid_request"
              },
              "message": {
                "type": "string",
                "description": "A plain-language explanation, safe to show to a developer.",
                "example": "Invalid request"
              },
              "details": {
                "description": "Extra facts, or null. `invalid_request` from body validation: `{ issues: [{ path, message }] }`; a bad media field: `{ field }`. `permission_denied`: `{ reason, ... }` with reason `key_permission`, `key_monthly_limit`, `monthly_limit` or `ip_not_allowed`. `insufficient_balance`: `{ required, available, currency }` in US dollars. `job_not_cancellable`: `{ status }`.",
                "oneOf": [
                  {
                    "type": "object",
                    "additionalProperties": true
                  },
                  {
                    "type": "null"
                  }
                ],
                "example": {
                  "issues": [
                    {
                      "path": "prompt",
                      "message": "Required"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "Money": {
        "type": "object",
        "description": "An amount of money in US dollars.",
        "required": [
          "amount",
          "currency"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "description": "US dollars."
          },
          "currency": {
            "type": "string",
            "enum": [
              "usd"
            ]
          }
        }
      },
      "FileInput": {
        "type": "string",
        "minLength": 1,
        "maxLength": 2000,
        "description": "A file: a public https URL (we download it once), or the `upload_…` id of a file you sent with `POST /v1/uploads`. Images: JPEG, PNG or WebP up to 10 MB. Audio: MP3, WAV, M4A or AAC up to 10 MB. Video: MP4 or MOV up to 50 MB.",
        "example": "https://yourshop.com/img/tea-room.jpg"
      },
      "Metadata": {
        "type": "object",
        "description": "Up to 20 string values you want back on the job and its events, such as your own order id. Keys up to 40 characters, values up to 500.",
        "maxProperties": 20,
        "propertyNames": {
          "maxLength": 40
        },
        "additionalProperties": {
          "type": "string",
          "maxLength": 500
        },
        "example": {
          "orderId": "1042"
        }
      },
      "Product": {
        "type": "string",
        "enum": [
          "video",
          "avatar",
          "ugc",
          "image",
          "tool",
          "audio",
          "swap"
        ],
        "description": "The product a job or quote belongs to."
      },
      "JobStatus": {
        "type": "string",
        "enum": [
          "queued",
          "running",
          "succeeded",
          "failed",
          "cancelled"
        ]
      },
      "VideoResolution": {
        "type": "string",
        "enum": [
          "480p",
          "720p",
          "1080p"
        ]
      },
      "AvatarResolution": {
        "type": "string",
        "enum": [
          "720p",
          "1080p"
        ]
      },
      "AspectRatio": {
        "type": "string",
        "enum": [
          "16:9",
          "9:16",
          "1:1",
          "21:9",
          "4:3",
          "3:4"
        ]
      },
      "ImageAspectRatio": {
        "type": "string",
        "enum": [
          "1:1",
          "4:3",
          "3:4",
          "16:9",
          "9:16",
          "3:2",
          "2:3"
        ]
      },
      "ImageSize": {
        "type": "string",
        "enum": [
          "1k",
          "2k",
          "4k"
        ]
      },
      "Emotion": {
        "type": "string",
        "enum": [
          "happy",
          "sad",
          "angry",
          "fearful",
          "disgusted",
          "surprised",
          "calm"
        ]
      },
      "TranslationLanguage": {
        "type": "string",
        "enum": [
          "en",
          "es",
          "fr",
          "de",
          "it",
          "pt",
          "nl",
          "pl",
          "fi",
          "cs",
          "ro",
          "el",
          "uk",
          "ru",
          "tr",
          "ar",
          "hi",
          "id",
          "th",
          "vi",
          "ja",
          "ko",
          "zh",
          "yue"
        ],
        "description": "A target language code. `GET /v1/models` lists them with their names."
      },
      "EventTypeOrAll": {
        "type": "string",
        "enum": [
          "*",
          "job.succeeded",
          "job.failed",
          "job.cancelled",
          "balance.low",
          "balance.topped_up",
          "balance.recharge_failed"
        ],
        "description": "`*` for every event, or one event type."
      },
      "ReferenceImage": {
        "description": "A reference picture: a file, or a file with what it shows.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/FileInput"
          },
          {
            "type": "object",
            "required": [
              "image"
            ],
            "properties": {
              "image": {
                "$ref": "#/components/schemas/FileInput"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "person",
                  "object",
                  "place"
                ],
                "default": "object"
              },
              "name": {
                "type": "string",
                "maxLength": 60,
                "description": "The name the prompt uses for it.",
                "example": "Mara"
              }
            }
          }
        ]
      },
      "ReferenceVoice": {
        "description": "A reference voice: an audio file, or an audio file with a name.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/FileInput"
          },
          {
            "type": "object",
            "required": [
              "audio"
            ],
            "properties": {
              "audio": {
                "$ref": "#/components/schemas/FileInput"
              },
              "name": {
                "type": "string",
                "maxLength": 60,
                "example": "Mara"
              }
            }
          }
        ]
      },
      "CreateVideoRequest": {
        "type": "object",
        "description": "A finished film from text, or a video from a picture (with `image`).",
        "required": [
          "prompt",
          "durationSeconds"
        ],
        "properties": {
          "model": {
            "type": "string",
            "default": "odyssey-1-ultra",
            "description": "The video model. `odyssey-1-ultra` is the only one.",
            "example": "odyssey-1-ultra"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000,
            "description": "What happens in the film: subject, setting, action, mood, dialogue.",
            "example": "A candlelit tea room at sunset, soft piano"
          },
          "durationSeconds": {
            "type": "integer",
            "minimum": 1,
            "description": "One of the `durations` the video model lists in `GET /v1/models`.",
            "example": 30
          },
          "resolution": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VideoResolution"
              }
            ],
            "default": "720p"
          },
          "aspectRatio": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AspectRatio"
              }
            ],
            "default": "16:9"
          },
          "sound": {
            "type": "boolean",
            "default": true,
            "description": "Dialogue, sound effects and music."
          },
          "image": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "Opening picture. Makes it a video from a picture (no `references` then)."
          },
          "endImage": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "Closing picture. Needs `image`; a video with an end frame is at most 15 seconds."
          },
          "references": {
            "type": "object",
            "description": "For films from text only: people, objects, places, clips and voices to keep consistent.",
            "properties": {
              "images": {
                "type": "array",
                "maxItems": 4,
                "items": {
                  "$ref": "#/components/schemas/ReferenceImage"
                }
              },
              "clips": {
                "type": "array",
                "maxItems": 3,
                "items": {
                  "$ref": "#/components/schemas/FileInput"
                },
                "description": "Video clips (MP4 or MOV)."
              },
              "voices": {
                "type": "array",
                "maxItems": 3,
                "items": {
                  "$ref": "#/components/schemas/ReferenceVoice"
                }
              }
            }
          },
          "webhookUrl": {
            "type": "string",
            "format": "uri",
            "description": "A public https URL we POST this job's events to (`job.succeeded`, `job.failed`, `job.cancelled`), signed with your account webhook secret (see `GET /v1/webhook-secret`).",
            "example": "https://yourapp.com/hooks/framera"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "CreateAvatarRequest": {
        "type": "object",
        "description": "A talking avatar from a photo. Send `script` (with an optional `voice`) or `audio`, not both.",
        "required": [
          "image"
        ],
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "odyssey-avatar"
            ],
            "default": "odyssey-avatar"
          },
          "image": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "The person: a photo."
          },
          "script": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1200,
            "description": "What they say, read in `voice`.",
            "example": "Welcome to the tea room. Tonight we pour a smoky lapsang by candlelight."
          },
          "voice": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "default": "English_expressive_narrator",
            "description": "A speech voice id from `GET /v1/models`, or one of your own cloned voices."
          },
          "audio": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "A recording they lip-sync to, instead of `script`."
          },
          "language": {
            "type": "string",
            "maxLength": 40,
            "description": "The language of the script.",
            "example": "English"
          },
          "resolution": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvatarResolution"
              }
            ],
            "default": "720p"
          },
          "music": {
            "type": "boolean",
            "default": false,
            "description": "Background music under the voice."
          },
          "aspectRatio": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AspectRatio"
              }
            ],
            "description": "Echoed back; the video keeps the photo's shape."
          },
          "durationSeconds": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 600,
            "description": "Quotes only: the audio's length, to price `audio` without reading it."
          },
          "webhookUrl": {
            "type": "string",
            "format": "uri",
            "description": "A public https URL we POST this job's events to (`job.succeeded`, `job.failed`, `job.cancelled`), signed with your account webhook secret (see `GET /v1/webhook-secret`).",
            "example": "https://yourapp.com/hooks/framera"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "CreateUgcRequest": {
        "type": "object",
        "description": "A UGC-style product ad. With `avatar` it is a talking ad presented by that person; without it, a video of `product.images[0]`. We write the script when you leave `script` out.",
        "required": [
          "product"
        ],
        "properties": {
          "product": {
            "type": "object",
            "required": [
              "name",
              "images"
            ],
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200,
                "example": "Ember Lapsang Tea"
              },
              "description": {
                "type": "string",
                "maxLength": 600,
                "example": "Smoky loose-leaf black tea, hand-rolled."
              },
              "images": {
                "type": "array",
                "minItems": 1,
                "maxItems": 4,
                "items": {
                  "$ref": "#/components/schemas/FileInput"
                },
                "description": "One to four product pictures."
              }
            }
          },
          "brief": {
            "type": "string",
            "maxLength": 1000,
            "description": "What the ad should get across.",
            "example": "Cozy evening ritual, warm and calm."
          },
          "script": {
            "type": "string",
            "minLength": 1,
            "maxLength": 800,
            "description": "Your own script."
          },
          "avatar": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "The presenter: a photo. Makes it a talking ad."
          },
          "voice": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "A speech voice id (talking ads). Default `English_expressive_narrator`."
          },
          "durationSeconds": {
            "type": "integer",
            "enum": [
              15,
              30
            ],
            "default": 15
          },
          "resolution": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvatarResolution"
              }
            ],
            "default": "720p"
          },
          "aspectRatio": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AspectRatio"
              }
            ],
            "default": "9:16"
          },
          "webhookUrl": {
            "type": "string",
            "format": "uri",
            "description": "A public https URL we POST this job's events to (`job.succeeded`, `job.failed`, `job.cancelled`), signed with your account webhook secret (see `GET /v1/webhook-secret`).",
            "example": "https://yourapp.com/hooks/framera"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "CreateImageRequest": {
        "type": "object",
        "required": [
          "model",
          "prompt"
        ],
        "properties": {
          "model": {
            "type": "string",
            "minLength": 1,
            "description": "An image model id from `GET /v1/models`.",
            "example": "nano-banana-pro"
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000,
            "example": "A candlelit tea room at sunset, soft piano"
          },
          "size": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ImageSize"
              }
            ],
            "default": "1k",
            "description": "One of the sizes the model lists."
          },
          "aspectRatio": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ImageAspectRatio"
              }
            ],
            "default": "1:1",
            "description": "One of the ratios the model lists."
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1,
            "description": "Up to the model's `maxCount`."
          },
          "references": {
            "type": "array",
            "maxItems": 8,
            "items": {
              "$ref": "#/components/schemas/FileInput"
            },
            "description": "Pictures to follow (style, product, person), up to the model's `maxReferences`."
          },
          "webhookUrl": {
            "type": "string",
            "format": "uri",
            "description": "A public https URL we POST this job's events to (`job.succeeded`, `job.failed`, `job.cancelled`), signed with your account webhook secret (see `GET /v1/webhook-secret`).",
            "example": "https://yourapp.com/hooks/framera"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "UpscaleRequest": {
        "type": "object",
        "required": [
          "image"
        ],
        "properties": {
          "image": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "The picture to upscale."
          },
          "factor": {
            "type": "integer",
            "enum": [
              2,
              4
            ],
            "default": 2
          },
          "width": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20000,
            "description": "Quotes only: the picture's width, to price it without reading it."
          },
          "height": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20000,
            "description": "Quotes only: the picture's height."
          },
          "webhookUrl": {
            "type": "string",
            "format": "uri",
            "description": "A public https URL we POST this job's events to (`job.succeeded`, `job.failed`, `job.cancelled`), signed with your account webhook secret (see `GET /v1/webhook-secret`).",
            "example": "https://yourapp.com/hooks/framera"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "RemoveBackgroundRequest": {
        "type": "object",
        "required": [
          "image"
        ],
        "properties": {
          "image": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "The picture to cut out."
          },
          "webhookUrl": {
            "type": "string",
            "format": "uri",
            "description": "A public https URL we POST this job's events to (`job.succeeded`, `job.failed`, `job.cancelled`), signed with your account webhook secret (see `GET /v1/webhook-secret`).",
            "example": "https://yourapp.com/hooks/framera"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "InpaintRequest": {
        "type": "object",
        "required": [
          "image",
          "mask",
          "prompt"
        ],
        "properties": {
          "image": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "The picture to change."
          },
          "mask": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "White where the picture should change; the same size as `image`."
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "description": "What to paint into the masked area.",
            "example": "A lit candle on the table"
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          },
          "width": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20000,
            "description": "Quotes only: the picture's width."
          },
          "height": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20000,
            "description": "Quotes only: the picture's height."
          },
          "webhookUrl": {
            "type": "string",
            "format": "uri",
            "description": "A public https URL we POST this job's events to (`job.succeeded`, `job.failed`, `job.cancelled`), signed with your account webhook secret (see `GET /v1/webhook-secret`).",
            "example": "https://yourapp.com/hooks/framera"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "SpeechRequest": {
        "type": "object",
        "required": [
          "text"
        ],
        "properties": {
          "text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 5000,
            "description": "Up to the speech model's `maxCharacters`.",
            "example": "Welcome to the tea room. Tonight we pour a smoky lapsang by candlelight."
          },
          "voice": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "default": "English_expressive_narrator",
            "description": "A speech voice id from `GET /v1/models`, or one of your own cloned voices."
          },
          "language": {
            "type": "string",
            "maxLength": 40,
            "example": "English"
          },
          "emotion": {
            "$ref": "#/components/schemas/Emotion"
          },
          "speed": {
            "type": "number",
            "minimum": 0.5,
            "maximum": 2
          },
          "webhookUrl": {
            "type": "string",
            "format": "uri",
            "description": "A public https URL we POST this job's events to (`job.succeeded`, `job.failed`, `job.cancelled`), signed with your account webhook secret (see `GET /v1/webhook-secret`).",
            "example": "https://yourapp.com/hooks/framera"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "VoiceChangeRequest": {
        "type": "object",
        "required": [
          "audio",
          "voice"
        ],
        "properties": {
          "audio": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "The recording to re-voice."
          },
          "voice": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "description": "A voice id from the voice changer's list in `GET /v1/models`."
          },
          "durationSeconds": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 600,
            "description": "Quotes only: the recording's length."
          },
          "webhookUrl": {
            "type": "string",
            "format": "uri",
            "description": "A public https URL we POST this job's events to (`job.succeeded`, `job.failed`, `job.cancelled`), signed with your account webhook secret (see `GET /v1/webhook-secret`).",
            "example": "https://yourapp.com/hooks/framera"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "TranslateRequest": {
        "type": "object",
        "description": "Send `audio` or `video` (one of them). The result is the translated speech as audio.",
        "required": [
          "targetLanguage"
        ],
        "properties": {
          "audio": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "The recording to translate."
          },
          "video": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "A video whose speech is translated."
          },
          "targetLanguage": {
            "$ref": "#/components/schemas/TranslationLanguage"
          },
          "voice": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "description": "Default: a voice of the target language."
          },
          "durationSeconds": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 600,
            "description": "Quotes only: the recording's length."
          },
          "webhookUrl": {
            "type": "string",
            "format": "uri",
            "description": "A public https URL we POST this job's events to (`job.succeeded`, `job.failed`, `job.cancelled`), signed with your account webhook secret (see `GET /v1/webhook-secret`).",
            "example": "https://yourapp.com/hooks/framera"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "SwapRequest": {
        "type": "object",
        "required": [
          "video",
          "image"
        ],
        "properties": {
          "video": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "The clip. Its length must be within the swap model's `minDurationSeconds` and `maxDurationSeconds`."
          },
          "image": {
            "allOf": [
              {
                "$ref": "#/components/schemas/FileInput"
              }
            ],
            "description": "The person to put in."
          },
          "durationSeconds": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 60,
            "description": "Quotes only: the clip's length."
          },
          "webhookUrl": {
            "type": "string",
            "format": "uri",
            "description": "A public https URL we POST this job's events to (`job.succeeded`, `job.failed`, `job.cancelled`), signed with your account webhook secret (see `GET /v1/webhook-secret`).",
            "example": "https://yourapp.com/hooks/framera"
          },
          "metadata": {
            "$ref": "#/components/schemas/Metadata"
          }
        }
      },
      "JobOutput": {
        "type": "object",
        "required": [
          "type",
          "url",
          "expiresAt"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "video",
              "image",
              "audio"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "A signed link, valid for an hour. Fetch the job again for a fresh one.",
            "example": "https://media.framera.ai/u/…/film.mp4?X-Amz-Signature=…"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-11-29T17:24:33.000Z"
          }
        }
      },
      "JobError": {
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "`generation_failed`, `content_refused`, `invalid_input` or `cancelled`.",
            "example": "generation_failed"
          },
          "message": {
            "type": "string",
            "example": "The generation failed for technical reasons. You were not charged."
          }
        }
      },
      "Job": {
        "type": "object",
        "description": "Every product returns this job object, with the settings you sent echoed on it (minus `webhookUrl` and `metadata`, which has its own field). The price is fixed when the job is created, held from your balance, and charged only if the job succeeds.",
        "required": [
          "id",
          "object",
          "type",
          "status",
          "model",
          "price",
          "outputs",
          "error",
          "metadata",
          "createdAt",
          "completedAt"
        ],
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "example": "3f6c2a1e-8b4d-4c1a-9e2f-7a5b0c9d1e42"
          },
          "object": {
            "type": "string",
            "enum": [
              "job"
            ]
          },
          "type": {
            "$ref": "#/components/schemas/Product"
          },
          "status": {
            "$ref": "#/components/schemas/JobStatus"
          },
          "model": {
            "type": "string",
            "example": "odyssey-1-ultra"
          },
          "operation": {
            "type": "string",
            "enum": [
              "upscale",
              "remove-background",
              "inpaint",
              "speech",
              "voice-change",
              "translate"
            ],
            "description": "Tool and audio jobs: which one."
          },
          "prompt": {
            "type": "string",
            "example": "A candlelit tea room at sunset, soft piano"
          },
          "durationSeconds": {
            "type": "number",
            "description": "Films: what you asked for. Avatars, voice changes, translations and swaps: the measured length.",
            "example": 30
          },
          "resolution": {
            "type": "string",
            "example": "1080p"
          },
          "aspectRatio": {
            "type": "string",
            "example": "16:9"
          },
          "sound": {
            "type": "boolean"
          },
          "width": {
            "type": "integer",
            "description": "Upscale and inpaint: the input picture's width."
          },
          "height": {
            "type": "integer",
            "description": "Upscale and inpaint: the input picture's height."
          },
          "voice": {
            "type": "string"
          },
          "script": {
            "type": "string",
            "description": "UGC jobs: the script we wrote, or the one you sent."
          },
          "transcript": {
            "type": "string",
            "description": "Translate jobs: what was said."
          },
          "translation": {
            "type": "string",
            "description": "Translate jobs: the translated text."
          },
          "sourceLanguage": {
            "type": "string",
            "description": "Translate jobs: the detected language."
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "outputs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobOutput"
            },
            "description": "Empty until the job has succeeded."
          },
          "error": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/JobError"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when the job failed or was cancelled."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "example": {
              "orderId": "1042"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-29T16:20:11.000Z"
          },
          "completedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": null
          }
        }
      },
      "JobList": {
        "type": "object",
        "description": "Your API jobs, newest first.",
        "required": [
          "object",
          "data",
          "hasMore"
        ],
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Job"
            }
          },
          "hasMore": {
            "type": "boolean",
            "description": "True when there is another page: pass the last id as `starting_after`."
          }
        }
      },
      "Pricing": {
        "type": "object",
        "description": "The live price list for a model, in US dollars. Which fields appear depends on the product: video and avatar `perSecond` by resolution (avatar also `minBilledSeconds` and `musicAddOn`; video `billedPer`), images `perImage` by size, upscale `byOutputMegapixels`, remove background `perImage`, inpaint `perMegapixel`, speech `per1000Characters`, voice change and translate `perMinute`, and worked `examples` for video, avatar, UGC and swap. For the exact price of one request, use `POST /v1/quotes`.",
        "required": [
          "currency",
          "unit"
        ],
        "additionalProperties": true,
        "properties": {
          "currency": {
            "type": "string",
            "enum": [
              "usd"
            ]
          },
          "unit": {
            "type": "string",
            "description": "What one price is for, such as `second`, `image`, `ad`, `clip`, `1000 characters`, `minute`.",
            "example": "second"
          },
          "perSecond": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          },
          "billedPer": {
            "type": "string"
          },
          "minBilledSeconds": {
            "type": "number"
          },
          "musicAddOn": {
            "type": "number"
          },
          "perImage": {
            "oneOf": [
              {
                "type": "number"
              },
              {
                "type": "object",
                "additionalProperties": {
                  "type": "number"
                }
              }
            ]
          },
          "byOutputMegapixels": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "upToMegapixels": {
                  "type": "number"
                },
                "amount": {
                  "type": "number"
                }
              }
            }
          },
          "perMegapixel": {
            "type": "number"
          },
          "per1000Characters": {
            "type": "number"
          },
          "perMinute": {
            "type": "number"
          },
          "examples": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "durationSeconds": {
                  "type": "number"
                },
                "resolution": {
                  "type": "string"
                },
                "amount": {
                  "type": "number"
                }
              }
            }
          }
        }
      },
      "VideoModel": {
        "type": "object",
        "description": "Odyssey 1 Ultra: finished films from text, and videos from a picture.",
        "required": [
          "id",
          "object",
          "type",
          "name",
          "pricing",
          "modes",
          "resolutions",
          "aspectRatios",
          "durations",
          "maxDurationSeconds",
          "paused"
        ],
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string",
            "example": "odyssey-1-ultra"
          },
          "object": {
            "type": "string",
            "enum": [
              "model"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "video"
            ]
          },
          "name": {
            "type": "string"
          },
          "modes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "text-to-video",
                "image-to-video"
              ]
            }
          },
          "resolutions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VideoResolution"
            }
          },
          "aspectRatios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AspectRatio"
            }
          },
          "durations": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "The `durationSeconds` values a film from text takes."
          },
          "maxDurationSeconds": {
            "type": "integer"
          },
          "endImageMaxSeconds": {
            "type": "integer",
            "example": 15
          },
          "sound": {
            "type": "boolean"
          },
          "references": {
            "type": "object",
            "description": "How many of each reference a film from text takes.",
            "properties": {
              "images": {
                "type": "integer",
                "example": 4
              },
              "clips": {
                "type": "integer",
                "example": 3
              },
              "voices": {
                "type": "integer",
                "example": 3
              }
            }
          },
          "paused": {
            "type": "boolean",
            "description": "True while the model is paused; creates answer 503 `model_paused`."
          },
          "pricing": {
            "$ref": "#/components/schemas/Pricing"
          }
        }
      },
      "AvatarModel": {
        "type": "object",
        "description": "Odyssey Avatar: talking avatars.",
        "required": [
          "id",
          "object",
          "type",
          "name",
          "pricing",
          "resolutions",
          "maxDurationSeconds",
          "minBilledSeconds",
          "paused"
        ],
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string",
            "example": "odyssey-avatar"
          },
          "object": {
            "type": "string",
            "enum": [
              "model"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "avatar"
            ]
          },
          "name": {
            "type": "string"
          },
          "resolutions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvatarResolution"
            }
          },
          "maxDurationSeconds": {
            "type": "number"
          },
          "minBilledSeconds": {
            "type": "number"
          },
          "music": {
            "type": "boolean"
          },
          "paused": {
            "type": "boolean",
            "description": "True while the model is paused; creates answer 503 `model_paused`."
          },
          "pricing": {
            "$ref": "#/components/schemas/Pricing"
          }
        }
      },
      "UgcModel": {
        "type": "object",
        "description": "UGC ads.",
        "required": [
          "id",
          "object",
          "type",
          "name",
          "pricing",
          "durations",
          "resolutions"
        ],
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string",
            "example": "ugc"
          },
          "object": {
            "type": "string",
            "enum": [
              "model"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "ugc"
            ]
          },
          "name": {
            "type": "string"
          },
          "durations": {
            "type": "array",
            "items": {
              "type": "integer",
              "enum": [
                15,
                30
              ]
            }
          },
          "resolutions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvatarResolution"
            }
          },
          "pricing": {
            "$ref": "#/components/schemas/Pricing"
          }
        }
      },
      "ImageModel": {
        "type": "object",
        "description": "An image model.",
        "required": [
          "id",
          "object",
          "type",
          "name",
          "pricing",
          "sizes",
          "aspectRatios",
          "maxCount",
          "maxReferences",
          "paused"
        ],
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string",
            "example": "nano-banana-pro"
          },
          "object": {
            "type": "string",
            "enum": [
              "model"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "image"
            ]
          },
          "name": {
            "type": "string"
          },
          "sizes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImageSize"
            }
          },
          "aspectRatios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImageAspectRatio"
            }
          },
          "maxCount": {
            "type": "integer"
          },
          "maxReferences": {
            "type": "integer",
            "description": "0 when the model takes no reference images."
          },
          "paused": {
            "type": "boolean",
            "description": "True while the model is paused; creates answer 503 `model_paused`."
          },
          "pricing": {
            "$ref": "#/components/schemas/Pricing"
          }
        }
      },
      "ToolModel": {
        "type": "object",
        "description": "An image tool.",
        "required": [
          "id",
          "object",
          "type",
          "name",
          "pricing",
          "paused"
        ],
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "upscale",
              "remove-background",
              "inpaint"
            ]
          },
          "object": {
            "type": "string",
            "enum": [
              "model"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "tool"
            ]
          },
          "name": {
            "type": "string"
          },
          "factors": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "Upscale only."
          },
          "maxCount": {
            "type": "integer",
            "description": "Inpaint only."
          },
          "paused": {
            "type": "boolean",
            "description": "True while the model is paused; creates answer 503 `model_paused`."
          },
          "pricing": {
            "$ref": "#/components/schemas/Pricing"
          }
        }
      },
      "AudioModel": {
        "type": "object",
        "description": "An audio model: speech, voice change or translate.",
        "required": [
          "id",
          "object",
          "type",
          "name",
          "pricing",
          "operation"
        ],
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string",
            "example": "speech-2.8-hd"
          },
          "object": {
            "type": "string",
            "enum": [
              "model"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "audio"
            ]
          },
          "name": {
            "type": "string"
          },
          "operation": {
            "type": "string",
            "enum": [
              "speech",
              "voice-change",
              "translate"
            ]
          },
          "maxCharacters": {
            "type": "integer",
            "description": "Speech only."
          },
          "emotions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Emotion"
            },
            "description": "Speech only."
          },
          "maxDurationSeconds": {
            "type": "integer",
            "description": "Voice change and translate."
          },
          "voices": {
            "type": "array",
            "description": "Speech: `{ id, name, language }`. Voice change: `{ id, name, description }`.",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "example": "English_expressive_narrator"
                },
                "name": {
                  "type": "string"
                },
                "language": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                }
              }
            }
          },
          "languages": {
            "type": "array",
            "description": "Translate only.",
            "items": {
              "type": "object",
              "required": [
                "code",
                "name"
              ],
              "properties": {
                "code": {
                  "$ref": "#/components/schemas/TranslationLanguage"
                },
                "name": {
                  "type": "string",
                  "example": "Spanish"
                }
              }
            }
          },
          "pricing": {
            "$ref": "#/components/schemas/Pricing"
          }
        }
      },
      "SwapModel": {
        "type": "object",
        "description": "Swap: put a person from a photo into a clip.",
        "required": [
          "id",
          "object",
          "type",
          "name",
          "pricing",
          "minDurationSeconds",
          "maxDurationSeconds"
        ],
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "type": "string",
            "enum": [
              "model"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "swap"
            ]
          },
          "name": {
            "type": "string"
          },
          "minDurationSeconds": {
            "type": "number"
          },
          "maxDurationSeconds": {
            "type": "number"
          },
          "pricing": {
            "$ref": "#/components/schemas/Pricing"
          }
        }
      },
      "ModelList": {
        "type": "object",
        "description": "Every product's models, grouped by product. A product that is not available right now has an empty list.",
        "required": [
          "object",
          "video",
          "avatar",
          "ugc",
          "image",
          "tool",
          "audio",
          "swap"
        ],
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "video": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VideoModel"
            }
          },
          "avatar": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AvatarModel"
            }
          },
          "ugc": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UgcModel"
            }
          },
          "image": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImageModel"
            }
          },
          "tool": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ToolModel"
            }
          },
          "audio": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AudioModel"
            }
          },
          "swap": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SwapModel"
            }
          }
        }
      },
      "QuoteRequest": {
        "type": "object",
        "description": "The product (and `operation` for tools and audio) with the body you would send to that create endpoint, nested as `body` or spread beside `product` (not both). A UGC quote always uses `body`, because the UGC body has its own `product` field. Media is measured, not stored.",
        "required": [
          "product"
        ],
        "additionalProperties": true,
        "properties": {
          "product": {
            "$ref": "#/components/schemas/Product"
          },
          "operation": {
            "type": "string",
            "enum": [
              "upscale",
              "remove-background",
              "inpaint",
              "speech",
              "voice-change",
              "translate"
            ],
            "description": "Required for `tool` (upscale, remove-background, inpaint) and `audio` (speech, voice-change, translate)."
          },
          "body": {
            "type": "object",
            "additionalProperties": true,
            "description": "The create body, such as a `CreateVideoRequest`."
          }
        }
      },
      "Quote": {
        "type": "object",
        "required": [
          "object",
          "product",
          "model",
          "price"
        ],
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "quote"
            ]
          },
          "product": {
            "$ref": "#/components/schemas/Product"
          },
          "model": {
            "type": "string",
            "example": "odyssey-1-ultra"
          },
          "operation": {
            "type": "string",
            "description": "Tool and audio quotes."
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          }
        }
      },
      "LegacyVideoQuoteRequest": {
        "type": "object",
        "required": [
          "durationSeconds"
        ],
        "properties": {
          "model": {
            "type": "string",
            "default": "odyssey-1-ultra"
          },
          "durationSeconds": {
            "type": "integer",
            "minimum": 1,
            "example": 30
          },
          "resolution": {
            "allOf": [
              {
                "$ref": "#/components/schemas/VideoResolution"
              }
            ],
            "default": "720p"
          },
          "sound": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "LegacyImageQuoteRequest": {
        "type": "object",
        "required": [
          "model"
        ],
        "properties": {
          "model": {
            "type": "string",
            "minLength": 1,
            "example": "nano-banana-pro"
          },
          "size": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ImageSize"
              }
            ],
            "default": "1k"
          },
          "count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 1
          }
        }
      },
      "LegacyQuote": {
        "type": "object",
        "required": [
          "object",
          "type",
          "product",
          "model",
          "price",
          "credits"
        ],
        "additionalProperties": true,
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "quote"
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "video",
              "image"
            ]
          },
          "product": {
            "type": "string",
            "enum": [
              "video",
              "image"
            ]
          },
          "model": {
            "type": "string"
          },
          "durationSeconds": {
            "type": "integer",
            "description": "Video quotes."
          },
          "resolution": {
            "type": "string",
            "description": "Video quotes."
          },
          "size": {
            "type": "string",
            "description": "Image quotes."
          },
          "count": {
            "type": "integer",
            "description": "Image quotes."
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "credits": {
            "type": "integer",
            "description": "framera.ai credits. Not used by API prices."
          }
        }
      },
      "UploadRequest": {
        "type": "object",
        "required": [
          "contentType",
          "size"
        ],
        "properties": {
          "filename": {
            "type": "string",
            "maxLength": 200,
            "example": "tea-room.jpg"
          },
          "contentType": {
            "type": "string",
            "enum": [
              "image/jpeg",
              "image/png",
              "image/webp",
              "audio/mpeg",
              "audio/wav",
              "audio/x-wav",
              "audio/mp4",
              "audio/x-m4a",
              "audio/aac",
              "video/mp4",
              "video/quicktime"
            ],
            "example": "image/jpeg"
          },
          "size": {
            "type": "integer",
            "minimum": 1,
            "description": "Bytes. Up to 10 MB for images and audio, 50 MB for video.",
            "example": 482113
          }
        }
      },
      "Upload": {
        "type": "object",
        "required": [
          "id",
          "object",
          "uploadUrl",
          "expiresAt",
          "contentType",
          "size"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Send this `upload_…` id in a create body.",
            "example": "upload_4Gh7qR2mXk9LpT3vNc8WzY1a"
          },
          "object": {
            "type": "string",
            "enum": [
              "upload"
            ]
          },
          "uploadUrl": {
            "type": "string",
            "format": "uri",
            "description": "PUT the file bytes here, with exactly this `Content-Type` and `Content-Length`, within 15 minutes."
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-29T16:35:11.000Z"
          },
          "contentType": {
            "type": "string",
            "example": "image/jpeg"
          },
          "size": {
            "type": "integer",
            "example": 482113
          }
        }
      },
      "Balance": {
        "type": "object",
        "required": [
          "object",
          "available",
          "held",
          "currency",
          "autoRecharge"
        ],
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "balance"
            ]
          },
          "available": {
            "type": "number",
            "description": "US dollars you can spend now."
          },
          "held": {
            "type": "number",
            "description": "US dollars held for jobs that are still running."
          },
          "currency": {
            "type": "string",
            "enum": [
              "usd"
            ]
          },
          "autoRecharge": {
            "type": "object",
            "required": [
              "enabled",
              "threshold",
              "amount"
            ],
            "properties": {
              "enabled": {
                "type": "boolean"
              },
              "threshold": {
                "type": "number",
                "description": "US dollars: recharge when the balance drops below this."
              },
              "amount": {
                "type": "number",
                "description": "US dollars added each time."
              }
            }
          }
        }
      },
      "WebhookSecret": {
        "type": "object",
        "required": [
          "object",
          "secret",
          "signatureHeader"
        ],
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "webhook_secret"
            ]
          },
          "secret": {
            "type": "string",
            "description": "The `whsec_…` account secret that signs per-request `webhookUrl` deliveries. The same for every key on the account.",
            "example": "whsec_…"
          },
          "signatureHeader": {
            "type": "string",
            "enum": [
              "Framera-Signature"
            ]
          }
        }
      },
      "WebhookEndpoint": {
        "type": "object",
        "required": [
          "id",
          "object",
          "url",
          "events",
          "description",
          "disabled",
          "createdAt"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "we_8Lw2Hc5JtQ9mVb3XkR7pNa1d"
          },
          "object": {
            "type": "string",
            "enum": [
              "webhook_endpoint"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://yourapp.com/hooks/framera"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventTypeOrAll"
            },
            "example": [
              "job.succeeded",
              "job.failed"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "Production backend"
          },
          "disabled": {
            "type": "boolean",
            "example": false
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-29T16:20:11.000Z"
          },
          "secret": {
            "type": "string",
            "description": "The endpoint's `whsec_…` signing secret. Only in the answer to create and roll-secret.",
            "example": "whsec_…"
          }
        }
      },
      "WebhookEndpointList": {
        "type": "object",
        "description": "All your webhook endpoints (up to 16), newest first. `hasMore` is always false.",
        "required": [
          "object",
          "data",
          "hasMore"
        ],
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEndpoint"
            }
          },
          "hasMore": {
            "type": "boolean",
            "description": "True when there is another page: pass the last id as `starting_after`."
          }
        }
      },
      "CreateWebhookEndpointRequest": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "description": "A public https URL.",
            "example": "https://yourapp.com/hooks/framera"
          },
          "events": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "$ref": "#/components/schemas/EventTypeOrAll"
            },
            "default": [
              "*"
            ],
            "example": [
              "job.succeeded",
              "job.failed"
            ]
          },
          "description": {
            "type": "string",
            "maxLength": 200,
            "example": "Production backend"
          }
        }
      },
      "UpdateWebhookEndpointRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000,
            "example": "https://yourapp.com/hooks/framera"
          },
          "events": {
            "type": "array",
            "maxItems": 20,
            "items": {
              "$ref": "#/components/schemas/EventTypeOrAll"
            }
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 200,
            "description": "null clears it."
          },
          "disabled": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "DeletedWebhookEndpoint": {
        "type": "object",
        "required": [
          "id",
          "object",
          "deleted"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "we_8Lw2Hc5JtQ9mVb3XkR7pNa1d"
          },
          "object": {
            "type": "string",
            "enum": [
              "webhook_endpoint"
            ]
          },
          "deleted": {
            "type": "boolean",
            "enum": [
              true
            ]
          }
        }
      },
      "Event": {
        "type": "object",
        "description": "Something that happened on your account. `job.*` events carry the job object as `data`; `balance.low` carries `{ object: \"balance\", available, held, currency }`; `balance.topped_up` carries `{ object: \"topup\", amount, currency, balance, ... }`; `balance.recharge_failed` carries `{ object: \"balance\", amount, currency, message }`. A test sent from the console has type `webhook.test`.",
        "required": [
          "id",
          "object",
          "type",
          "createdAt",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "example": "evt_8Lw2Kp4QzX7cVn1MbR9tHy3s"
          },
          "object": {
            "type": "string",
            "enum": [
              "event"
            ]
          },
          "type": {
            "type": "string",
            "description": "An event type, or `webhook.test`.",
            "example": "job.succeeded"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-29T16:24:33.000Z"
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "The job object for `job.*` events."
          }
        }
      },
      "EventList": {
        "type": "object",
        "description": "Your events, newest first.",
        "required": [
          "object",
          "data",
          "hasMore"
        ],
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ]
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Event"
            }
          },
          "hasMore": {
            "type": "boolean",
            "description": "True when there is another page: pass the last id as `starting_after`."
          }
        }
      }
    }
  }
}