{
 "name": "BobaBanana API tools",
 "version": "1.3.0",
 "base_url": "https://bobabanana.com/api/v1",
 "auth": {
  "header": "Authorization",
  "value": "Bearer <your bb_ API key>"
 },
 "docs": "https://bobabanana.com/docs/api/agents/",
 "how_to_call": "Each tool is one HTTP call: put path_params into the url, send query_params as the query string and every other argument as the JSON body. For tools with idempotency_key, send a fresh Idempotency-Key header (a UUID) and reuse it only when retrying the same call.",
 "tools": [
  {
   "name": "generate_image",
   "description": "Make a picture from a prompt and up to 10 reference pictures or library assets. Returns a job; then call wait_for_job.",
   "input_schema": {
    "type": "object",
    "properties": {
     "webhook_url": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 500
       },
       {
        "type": "null"
       }
      ],
      "description": "https:// URL that receives a signed POST when the job finishes"
     },
     "metadata": {
      "anyOf": [
       {
        "type": "object",
        "maxProperties": 16,
        "propertyNames": {
         "maxLength": 40
        },
        "additionalProperties": {
         "type": "string",
         "maxLength": 500
        }
       },
       {
        "type": "null"
       }
      ],
      "description": "Up to 16 keys (40 characters each) with string values (500 characters each), echoed back on the job and its webhook"
     },
     "name": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 80
       },
       {
        "type": "null"
       }
      ],
      "description": "Label shown in the BobaBanana studio"
     },
     "max_credits": {
      "anyOf": [
       {
        "type": "integer",
        "minimum": 0.0
       },
       {
        "type": "null"
       }
      ],
      "description": "Refuse the job (400 cost_above_max, nothing held) if it would cost more than this"
     },
     "dry_run": {
      "type": "boolean",
      "description": "true: answer 200 with what the job would cost (credits_estimate) and make nothing: nothing is queued, held or stored, and no Idempotency-Key is used",
      "default": false
     },
     "prompt": {
      "type": "string",
      "maxLength": 1500,
      "minLength": 1,
      "description": "What to create"
     },
     "reference_images": {
      "items": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        }
       ]
      },
      "type": "array",
      "maxItems": 10,
      "description": "Up to 10 pictures to keep consistent: characters, products, places, styles"
     },
     "assets": {
      "items": {
       "type": "string"
      },
      "type": "array",
      "maxItems": 10,
      "description": "Approved library assets by handle, e.g. ['@maya', '@red_sofa']"
     },
     "aspect_ratio": {
      "type": "string",
      "enum": [
       "16:9",
       "9:16",
       "1:1",
       "4:3",
       "3:4"
      ],
      "default": "16:9"
     }
    },
    "required": [
     "prompt"
    ],
    "additionalProperties": false
   },
   "http": {
    "method": "POST",
    "url": "https://bobabanana.com/api/v1/images",
    "path_params": [],
    "query_params": [],
    "idempotency_key": true
   }
  },
  {
   "name": "generate_video",
   "description": "Make a video: animate a picture, generate from text, copy a clip's motion (motion_video), extend a clip (extend_video) or make a character talk (voice + script). Returns a job; then call wait_for_job. Use dry_run: true or max_credits to control cost.",
   "input_schema": {
    "type": "object",
    "properties": {
     "webhook_url": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 500
       },
       {
        "type": "null"
       }
      ],
      "description": "https:// URL that receives a signed POST when the job finishes"
     },
     "metadata": {
      "anyOf": [
       {
        "type": "object",
        "maxProperties": 16,
        "propertyNames": {
         "maxLength": 40
        },
        "additionalProperties": {
         "type": "string",
         "maxLength": 500
        }
       },
       {
        "type": "null"
       }
      ],
      "description": "Up to 16 keys (40 characters each) with string values (500 characters each), echoed back on the job and its webhook"
     },
     "name": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 80
       },
       {
        "type": "null"
       }
      ],
      "description": "Label shown in the BobaBanana studio"
     },
     "max_credits": {
      "anyOf": [
       {
        "type": "integer",
        "minimum": 0.0
       },
       {
        "type": "null"
       }
      ],
      "description": "Refuse the job (400 cost_above_max, nothing held) if it would cost more than this"
     },
     "dry_run": {
      "type": "boolean",
      "description": "true: answer 200 with what the job would cost (credits_estimate) and make nothing: nothing is queued, held or stored, and no Idempotency-Key is used",
      "default": false
     },
     "prompt": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 1500
       },
       {
        "type": "null"
       }
      ],
      "description": "The scene. Used to make the first frame when no image is given, and as the motion prompt when motion is empty."
     },
     "image": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ],
          "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ],
          "description": "Public https:// URL to download"
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ],
          "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
         },
         "label": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 200
           },
           {
            "type": "null"
           }
          ],
          "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
         }
        },
        "type": "object",
        "description": "One input file. Give exactly one of file_id, url or data."
       },
       {
        "type": "null"
       }
      ],
      "description": "Start frame to animate. If omitted, a first frame is generated from prompt + references."
     },
     "last_frame": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ],
          "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ],
          "description": "Public https:// URL to download"
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ],
          "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
         },
         "label": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 200
           },
           {
            "type": "null"
           }
          ],
          "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
         }
        },
        "type": "object",
        "description": "One input file. Give exactly one of file_id, url or data."
       },
       {
        "type": "null"
       }
      ],
      "description": "Last frame: the video moves from the first frame to this picture. Priced as a first + last frame video."
     },
     "extend_video": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ],
          "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ],
          "description": "Public https:// URL to download"
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ],
          "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
         },
         "label": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 200
           },
           {
            "type": "null"
           }
          ],
          "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
         }
        },
        "type": "object",
        "description": "One input file. Give exactly one of file_id, url or data."
       },
       {
        "type": "null"
       }
      ],
      "description": "Extend a clip: an mp4, mov or webm video of 15 seconds at most (url, or data up to about 25 MB). Its last frame becomes the start frame. Instead of image; priced as plain video unless last_frame is given."
     },
     "motion_video": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ],
          "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ],
          "description": "Public https:// URL to download"
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ],
          "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
         },
         "label": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 200
           },
           {
            "type": "null"
           }
          ],
          "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
         }
        },
        "type": "object",
        "description": "One input file. Give exactly one of file_id, url or data."
       },
       {
        "type": "null"
       }
      ],
      "description": "Motion transfer: a clip whose motion, performance and camera move are copied onto the subject in 'image' (or one asset in 'assets'). An mp4 or mov (H.264 or H.265), 1-15 seconds, 23.976-60 fps, each side at least 256 px, at most 50 MB (url, or data up to about 25 MB). The video is as long as the clip; duration_seconds is ignored. Made in the studio when it can be made in time, else with premium rendering; check cost.credits_estimate (the most it costs) or send max_credits."
     },
     "match_pose": {
      "type": "boolean",
      "description": "Motion transfer only: first redraw the subject in the poses, framing and shape of the clip's opening, middle and closing frames (the opening frame only for clips under 2 s; one opening-frame picture when the studio makes it; each a picture step at the picture price), and guide the video with those pictures. false sends the subject as it is (then only premium rendering can make it).",
      "default": true
     },
     "keep_sound": {
      "type": "boolean",
      "description": "Motion transfer only: put the clip's own sound on the result when the clip has sound.",
      "default": true
     },
     "first_shot_only": {
      "type": "boolean",
      "description": "Motion transfer only: when the clip has cuts (several scenes), make only its first shot, at the normal price of a clip that long. Without it every scene is made and joined under the clip's own sound, at 1.5x the normal price (see POST /v1/videos/estimate).",
      "default": false
     },
     "reference_images": {
      "items": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        }
       ]
      },
      "type": "array",
      "maxItems": 10
     },
     "assets": {
      "items": {
       "type": "string"
      },
      "type": "array",
      "maxItems": 10
     },
     "motion": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 400
       },
       {
        "type": "null"
       }
      ],
      "description": "How things move, e.g. 'slow push-in, she turns and smiles'"
     },
     "duration_seconds": {
      "type": "number",
      "maximum": 15.0,
      "minimum": 2.0,
      "description": "2-10 s at 720p; 3-15 s at 1080p and 2160p (10 s at most with last_frame)",
      "default": 5
     },
     "aspect_ratio": {
      "type": "string",
      "enum": [
       "16:9",
       "9:16",
       "1:1",
       "4:3",
       "3:4"
      ],
      "default": "16:9"
     },
     "resolution": {
      "type": "string",
      "enum": [
       "720p",
       "1080p",
       "2160p"
      ],
      "description": "720p (standard), 1080p or 2160p (4K, made with premium rendering and priced from its live quote; 16:9 or 9:16; no voice or audio). Check cost.credits_estimate, or send max_credits.",
      "default": "720p"
     },
     "voice": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ]
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ]
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ]
         },
         "transcript": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 1000
           },
           {
            "type": "null"
           }
          ],
          "description": "Exact words spoken in the sample. If omitted, BobaBanana transcribes it first."
         }
        },
        "type": "object",
        "description": "A recording of the voice to clone: 5 to 30 seconds, one speaker, no music."
       },
       {
        "type": "null"
       }
      ],
      "description": "Voice to speak the script: '@handle' of a saved voice, or a sample to clone"
     },
     "voice_consent": {
      "type": "boolean",
      "description": "Required with an uploaded voice sample",
      "default": false
     },
     "script": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 600
       },
       {
        "type": "null"
       }
      ],
      "description": "Words the character says, lip-synced"
     },
     "audio": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ],
          "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ],
          "description": "Public https:// URL to download"
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ],
          "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
         },
         "label": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 200
           },
           {
            "type": "null"
           }
          ],
          "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
         }
        },
        "type": "object",
        "description": "One input file. Give exactly one of file_id, url or data."
       },
       {
        "type": "null"
       }
      ],
      "description": "Pre-recorded speech or soundtrack that drives the clip (instead of voice + script)"
     },
     "sound_effect": {
      "anyOf": [
       {
        "properties": {
         "prompt": {
          "type": "string",
          "maxLength": 300,
          "minLength": 1
         },
         "duration_seconds": {
          "type": "number",
          "maximum": 20.0,
          "minimum": 2.0,
          "default": 8
         }
        },
        "type": "object",
        "required": [
         "prompt"
        ]
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "required": [],
    "additionalProperties": false
   },
   "http": {
    "method": "POST",
    "url": "https://bobabanana.com/api/v1/videos",
    "path_params": [],
    "query_params": [],
    "idempotency_key": true
   }
  },
  {
   "name": "estimate_video",
   "description": "Price a motion transfer (a video with motion_video) before making it: scenes, multiplier, credits. Makes nothing.",
   "input_schema": {
    "type": "object",
    "properties": {
     "webhook_url": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 500
       },
       {
        "type": "null"
       }
      ],
      "description": "https:// URL that receives a signed POST when the job finishes"
     },
     "metadata": {
      "anyOf": [
       {
        "type": "object",
        "maxProperties": 16,
        "propertyNames": {
         "maxLength": 40
        },
        "additionalProperties": {
         "type": "string",
         "maxLength": 500
        }
       },
       {
        "type": "null"
       }
      ],
      "description": "Up to 16 keys (40 characters each) with string values (500 characters each), echoed back on the job and its webhook"
     },
     "name": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 80
       },
       {
        "type": "null"
       }
      ],
      "description": "Label shown in the BobaBanana studio"
     },
     "max_credits": {
      "anyOf": [
       {
        "type": "integer",
        "minimum": 0.0
       },
       {
        "type": "null"
       }
      ],
      "description": "Refuse the job (400 cost_above_max, nothing held) if it would cost more than this"
     },
     "dry_run": {
      "type": "boolean",
      "description": "true: answer 200 with what the job would cost (credits_estimate) and make nothing: nothing is queued, held or stored, and no Idempotency-Key is used",
      "default": false
     },
     "prompt": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 1500
       },
       {
        "type": "null"
       }
      ],
      "description": "The scene. Used to make the first frame when no image is given, and as the motion prompt when motion is empty."
     },
     "image": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ],
          "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ],
          "description": "Public https:// URL to download"
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ],
          "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
         },
         "label": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 200
           },
           {
            "type": "null"
           }
          ],
          "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
         }
        },
        "type": "object",
        "description": "One input file. Give exactly one of file_id, url or data."
       },
       {
        "type": "null"
       }
      ],
      "description": "Start frame to animate. If omitted, a first frame is generated from prompt + references."
     },
     "last_frame": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ],
          "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ],
          "description": "Public https:// URL to download"
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ],
          "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
         },
         "label": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 200
           },
           {
            "type": "null"
           }
          ],
          "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
         }
        },
        "type": "object",
        "description": "One input file. Give exactly one of file_id, url or data."
       },
       {
        "type": "null"
       }
      ],
      "description": "Last frame: the video moves from the first frame to this picture. Priced as a first + last frame video."
     },
     "extend_video": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ],
          "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ],
          "description": "Public https:// URL to download"
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ],
          "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
         },
         "label": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 200
           },
           {
            "type": "null"
           }
          ],
          "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
         }
        },
        "type": "object",
        "description": "One input file. Give exactly one of file_id, url or data."
       },
       {
        "type": "null"
       }
      ],
      "description": "Extend a clip: an mp4, mov or webm video of 15 seconds at most (url, or data up to about 25 MB). Its last frame becomes the start frame. Instead of image; priced as plain video unless last_frame is given."
     },
     "motion_video": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ],
          "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ],
          "description": "Public https:// URL to download"
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ],
          "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
         },
         "label": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 200
           },
           {
            "type": "null"
           }
          ],
          "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
         }
        },
        "type": "object",
        "description": "One input file. Give exactly one of file_id, url or data."
       },
       {
        "type": "null"
       }
      ],
      "description": "Motion transfer: a clip whose motion, performance and camera move are copied onto the subject in 'image' (or one asset in 'assets'). An mp4 or mov (H.264 or H.265), 1-15 seconds, 23.976-60 fps, each side at least 256 px, at most 50 MB (url, or data up to about 25 MB). The video is as long as the clip; duration_seconds is ignored. Made in the studio when it can be made in time, else with premium rendering; check cost.credits_estimate (the most it costs) or send max_credits."
     },
     "match_pose": {
      "type": "boolean",
      "description": "Motion transfer only: first redraw the subject in the poses, framing and shape of the clip's opening, middle and closing frames (the opening frame only for clips under 2 s; one opening-frame picture when the studio makes it; each a picture step at the picture price), and guide the video with those pictures. false sends the subject as it is (then only premium rendering can make it).",
      "default": true
     },
     "keep_sound": {
      "type": "boolean",
      "description": "Motion transfer only: put the clip's own sound on the result when the clip has sound.",
      "default": true
     },
     "first_shot_only": {
      "type": "boolean",
      "description": "Motion transfer only: when the clip has cuts (several scenes), make only its first shot, at the normal price of a clip that long. Without it every scene is made and joined under the clip's own sound, at 1.5x the normal price (see POST /v1/videos/estimate).",
      "default": false
     },
     "reference_images": {
      "items": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        }
       ]
      },
      "type": "array",
      "maxItems": 10
     },
     "assets": {
      "items": {
       "type": "string"
      },
      "type": "array",
      "maxItems": 10
     },
     "motion": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 400
       },
       {
        "type": "null"
       }
      ],
      "description": "How things move, e.g. 'slow push-in, she turns and smiles'"
     },
     "duration_seconds": {
      "type": "number",
      "maximum": 15.0,
      "minimum": 2.0,
      "description": "2-10 s at 720p; 3-15 s at 1080p and 2160p (10 s at most with last_frame)",
      "default": 5
     },
     "aspect_ratio": {
      "type": "string",
      "enum": [
       "16:9",
       "9:16",
       "1:1",
       "4:3",
       "3:4"
      ],
      "default": "16:9"
     },
     "resolution": {
      "type": "string",
      "enum": [
       "720p",
       "1080p",
       "2160p"
      ],
      "description": "720p (standard), 1080p or 2160p (4K, made with premium rendering and priced from its live quote; 16:9 or 9:16; no voice or audio). Check cost.credits_estimate, or send max_credits.",
      "default": "720p"
     },
     "voice": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ]
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ]
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ]
         },
         "transcript": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 1000
           },
           {
            "type": "null"
           }
          ],
          "description": "Exact words spoken in the sample. If omitted, BobaBanana transcribes it first."
         }
        },
        "type": "object",
        "description": "A recording of the voice to clone: 5 to 30 seconds, one speaker, no music."
       },
       {
        "type": "null"
       }
      ],
      "description": "Voice to speak the script: '@handle' of a saved voice, or a sample to clone"
     },
     "voice_consent": {
      "type": "boolean",
      "description": "Required with an uploaded voice sample",
      "default": false
     },
     "script": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 600
       },
       {
        "type": "null"
       }
      ],
      "description": "Words the character says, lip-synced"
     },
     "audio": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ],
          "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ],
          "description": "Public https:// URL to download"
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ],
          "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
         },
         "label": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 200
           },
           {
            "type": "null"
           }
          ],
          "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
         }
        },
        "type": "object",
        "description": "One input file. Give exactly one of file_id, url or data."
       },
       {
        "type": "null"
       }
      ],
      "description": "Pre-recorded speech or soundtrack that drives the clip (instead of voice + script)"
     },
     "sound_effect": {
      "anyOf": [
       {
        "properties": {
         "prompt": {
          "type": "string",
          "maxLength": 300,
          "minLength": 1
         },
         "duration_seconds": {
          "type": "number",
          "maximum": 20.0,
          "minimum": 2.0,
          "default": 8
         }
        },
        "type": "object",
        "required": [
         "prompt"
        ]
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "required": [],
    "additionalProperties": false
   },
   "http": {
    "method": "POST",
    "url": "https://bobabanana.com/api/v1/videos/estimate",
    "path_params": [],
    "query_params": [],
    "idempotency_key": false
   }
  },
  {
   "name": "generate_speech",
   "description": "Speak text in a saved voice (@handle) or a voice cloned from a sample (needs voice_consent). Returns a job; then call wait_for_job.",
   "input_schema": {
    "type": "object",
    "properties": {
     "webhook_url": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 500
       },
       {
        "type": "null"
       }
      ],
      "description": "https:// URL that receives a signed POST when the job finishes"
     },
     "metadata": {
      "anyOf": [
       {
        "type": "object",
        "maxProperties": 16,
        "propertyNames": {
         "maxLength": 40
        },
        "additionalProperties": {
         "type": "string",
         "maxLength": 500
        }
       },
       {
        "type": "null"
       }
      ],
      "description": "Up to 16 keys (40 characters each) with string values (500 characters each), echoed back on the job and its webhook"
     },
     "name": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 80
       },
       {
        "type": "null"
       }
      ],
      "description": "Label shown in the BobaBanana studio"
     },
     "max_credits": {
      "anyOf": [
       {
        "type": "integer",
        "minimum": 0.0
       },
       {
        "type": "null"
       }
      ],
      "description": "Refuse the job (400 cost_above_max, nothing held) if it would cost more than this"
     },
     "dry_run": {
      "type": "boolean",
      "description": "true: answer 200 with what the job would cost (credits_estimate) and make nothing: nothing is queued, held or stored, and no Idempotency-Key is used",
      "default": false
     },
     "text": {
      "type": "string",
      "maxLength": 600,
      "minLength": 1
     },
     "voice": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "properties": {
         "file_id": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 64
           },
           {
            "type": "null"
           }
          ]
         },
         "url": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 2000
           },
           {
            "type": "null"
           }
          ]
         },
         "data": {
          "anyOf": [
           {
            "type": "string"
           },
           {
            "type": "null"
           }
          ]
         },
         "transcript": {
          "anyOf": [
           {
            "type": "string",
            "maxLength": 1000
           },
           {
            "type": "null"
           }
          ],
          "description": "Exact words spoken in the sample. If omitted, BobaBanana transcribes it first."
         }
        },
        "type": "object",
        "description": "A recording of the voice to clone: 5 to 30 seconds, one speaker, no music."
       }
      ]
     },
     "voice_consent": {
      "type": "boolean",
      "default": false
     }
    },
    "required": [
     "text",
     "voice"
    ],
    "additionalProperties": false
   },
   "http": {
    "method": "POST",
    "url": "https://bobabanana.com/api/v1/speech",
    "path_params": [],
    "query_params": [],
    "idempotency_key": true
   }
  },
  {
   "name": "generate_sound_effect",
   "description": "Make a 2 to 20 second sound effect from a description. Returns a job; then call wait_for_job.",
   "input_schema": {
    "type": "object",
    "properties": {
     "webhook_url": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 500
       },
       {
        "type": "null"
       }
      ],
      "description": "https:// URL that receives a signed POST when the job finishes"
     },
     "metadata": {
      "anyOf": [
       {
        "type": "object",
        "maxProperties": 16,
        "propertyNames": {
         "maxLength": 40
        },
        "additionalProperties": {
         "type": "string",
         "maxLength": 500
        }
       },
       {
        "type": "null"
       }
      ],
      "description": "Up to 16 keys (40 characters each) with string values (500 characters each), echoed back on the job and its webhook"
     },
     "name": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 80
       },
       {
        "type": "null"
       }
      ],
      "description": "Label shown in the BobaBanana studio"
     },
     "max_credits": {
      "anyOf": [
       {
        "type": "integer",
        "minimum": 0.0
       },
       {
        "type": "null"
       }
      ],
      "description": "Refuse the job (400 cost_above_max, nothing held) if it would cost more than this"
     },
     "dry_run": {
      "type": "boolean",
      "description": "true: answer 200 with what the job would cost (credits_estimate) and make nothing: nothing is queued, held or stored, and no Idempotency-Key is used",
      "default": false
     },
     "prompt": {
      "type": "string",
      "maxLength": 300,
      "minLength": 1,
      "description": "e.g. 'rain on a tin roof with distant thunder'"
     },
     "duration_seconds": {
      "type": "number",
      "maximum": 20.0,
      "minimum": 2.0,
      "default": 8
     }
    },
    "required": [
     "prompt"
    ],
    "additionalProperties": false
   },
   "http": {
    "method": "POST",
    "url": "https://bobabanana.com/api/v1/sound-effects",
    "path_params": [],
    "query_params": [],
    "idempotency_key": true
   }
  },
  {
   "name": "wait_for_job",
   "description": "Get a job and wait up to 30 seconds for it to finish. Repeat until status is succeeded, failed or canceled; on succeeded, output holds signed download links.",
   "input_schema": {
    "type": "object",
    "properties": {
     "job_id": {
      "type": "string",
      "description": "The job's id, e.g. x_8d21c0f4a9b3."
     },
     "wait": {
      "type": "integer",
      "maximum": 30,
      "minimum": 0,
      "description": "Seconds to wait for the job to finish before answering (0 to 30). The call returns as soon as the job finishes.",
      "default": 30
     }
    },
    "required": [
     "job_id"
    ],
    "additionalProperties": false
   },
   "http": {
    "method": "GET",
    "url": "https://bobabanana.com/api/v1/jobs/{job_id}",
    "path_params": [
     "job_id"
    ],
    "query_params": [
     "wait"
    ],
    "idempotency_key": false
   }
  },
  {
   "name": "upscale_job",
   "description": "Make a larger, sharper copy of a finished image or video job. Check get_upscale_options first. Returns a job; then call wait_for_job.",
   "input_schema": {
    "type": "object",
    "properties": {
     "job_id": {
      "type": "string",
      "description": "The job's id, e.g. x_8d21c0f4a9b3."
     },
     "webhook_url": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 500
       },
       {
        "type": "null"
       }
      ],
      "description": "https:// URL that receives a signed POST when the job finishes"
     },
     "metadata": {
      "anyOf": [
       {
        "type": "object",
        "maxProperties": 16,
        "propertyNames": {
         "maxLength": 40
        },
        "additionalProperties": {
         "type": "string",
         "maxLength": 500
        }
       },
       {
        "type": "null"
       }
      ],
      "description": "Up to 16 keys (40 characters each) with string values (500 characters each), echoed back on the job and its webhook"
     },
     "name": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 80
       },
       {
        "type": "null"
       }
      ],
      "description": "Label shown in the BobaBanana studio"
     },
     "max_credits": {
      "anyOf": [
       {
        "type": "integer",
        "minimum": 0.0
       },
       {
        "type": "null"
       }
      ],
      "description": "Refuse the job (400 cost_above_max, nothing held) if it would cost more than this"
     },
     "dry_run": {
      "type": "boolean",
      "description": "true: answer 200 with what the job would cost (credits_estimate) and make nothing: nothing is queued, held or stored, and no Idempotency-Key is used",
      "default": false
     },
     "factor": {
      "type": "number",
      "description": "How much larger: 2 or 4 for an image job; 2, 2.25 (480p to 1080p) or 4 for a video job. GET /v1/jobs/{job_id}/upscale-options lists what a job allows and costs",
      "default": 2
     }
    },
    "required": [
     "job_id"
    ],
    "additionalProperties": false
   },
   "http": {
    "method": "POST",
    "url": "https://bobabanana.com/api/v1/jobs/{job_id}/upscale",
    "path_params": [
     "job_id"
    ],
    "query_params": [],
    "idempotency_key": true
   }
  },
  {
   "name": "get_upscale_options",
   "description": "List the upscale factors a finished job allows and what each costs.",
   "input_schema": {
    "type": "object",
    "properties": {
     "job_id": {
      "type": "string",
      "description": "The job's id, e.g. x_8d21c0f4a9b3."
     }
    },
    "required": [
     "job_id"
    ],
    "additionalProperties": false
   },
   "http": {
    "method": "GET",
    "url": "https://bobabanana.com/api/v1/jobs/{job_id}/upscale-options",
    "path_params": [
     "job_id"
    ],
    "query_params": [],
    "idempotency_key": false
   }
  },
  {
   "name": "list_assets",
   "description": "Find approved library characters, objects, places and scenes to use by @handle.",
   "input_schema": {
    "type": "object",
    "properties": {
     "kind": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "Only assets of this kind, e.g. human, nonhuman, object, place, scene or voice."
     },
     "search": {
      "anyOf": [
       {
        "type": "string",
        "maxLength": 100
       },
       {
        "type": "null"
       }
      ],
      "description": "Text to find in the name, handle or description (up to 100 characters)."
     },
     "limit": {
      "type": "integer",
      "maximum": 200,
      "minimum": 1,
      "description": "Assets per page (1 to 200).",
      "default": 50
     },
     "before": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "next_cursor from the previous page: returns the items after it."
     },
     "include": {
      "anyOf": [
       {
        "const": "sample",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "sample: add each voice's sample_url (a signed link to its recording)."
     }
    },
    "required": [],
    "additionalProperties": false
   },
   "http": {
    "method": "GET",
    "url": "https://bobabanana.com/api/v1/assets",
    "path_params": [],
    "query_params": [
     "kind",
     "search",
     "limit",
     "before",
     "include"
    ],
    "idempotency_key": false
   }
  },
  {
   "name": "list_voices",
   "description": "Find saved voices to use as voice: '@handle'.",
   "input_schema": {
    "type": "object",
    "properties": {
     "limit": {
      "type": "integer",
      "maximum": 200,
      "minimum": 1,
      "description": "Voices per page (1 to 200).",
      "default": 200
     },
     "before": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "next_cursor from the previous page: returns the items after it."
     },
     "include": {
      "anyOf": [
       {
        "const": "sample",
        "type": "string"
       },
       {
        "type": "null"
       }
      ],
      "description": "sample: add each voice's sample_url (a signed link to its recording)."
     }
    },
    "required": [],
    "additionalProperties": false
   },
   "http": {
    "method": "GET",
    "url": "https://bobabanana.com/api/v1/voices",
    "path_params": [],
    "query_params": [
     "limit",
     "before",
     "include"
    ],
    "idempotency_key": false
   }
  },
  {
   "name": "get_balance",
   "description": "Check the workspace's available credits before a costly job.",
   "input_schema": {
    "type": "object",
    "properties": {},
    "required": [],
    "additionalProperties": false
   },
   "http": {
    "method": "GET",
    "url": "https://bobabanana.com/api/v1/balance",
    "path_params": [],
    "query_params": [],
    "idempotency_key": false
   }
  },
  {
   "name": "list_prices",
   "description": "Read the price table (credits per job kind).",
   "input_schema": {
    "type": "object",
    "properties": {},
    "required": [],
    "additionalProperties": false
   },
   "http": {
    "method": "GET",
    "url": "https://bobabanana.com/api/v1/prices",
    "path_params": [],
    "query_params": [],
    "idempotency_key": false
   }
  }
 ],
 "functions": [
  {
   "type": "function",
   "function": {
    "name": "generate_image",
    "description": "Make a picture from a prompt and up to 10 reference pictures or library assets. Returns a job; then call wait_for_job.",
    "parameters": {
     "type": "object",
     "properties": {
      "webhook_url": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 500
        },
        {
         "type": "null"
        }
       ],
       "description": "https:// URL that receives a signed POST when the job finishes"
      },
      "metadata": {
       "anyOf": [
        {
         "type": "object",
         "maxProperties": 16,
         "propertyNames": {
          "maxLength": 40
         },
         "additionalProperties": {
          "type": "string",
          "maxLength": 500
         }
        },
        {
         "type": "null"
        }
       ],
       "description": "Up to 16 keys (40 characters each) with string values (500 characters each), echoed back on the job and its webhook"
      },
      "name": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 80
        },
        {
         "type": "null"
        }
       ],
       "description": "Label shown in the BobaBanana studio"
      },
      "max_credits": {
       "anyOf": [
        {
         "type": "integer",
         "minimum": 0.0
        },
        {
         "type": "null"
        }
       ],
       "description": "Refuse the job (400 cost_above_max, nothing held) if it would cost more than this"
      },
      "dry_run": {
       "type": "boolean",
       "description": "true: answer 200 with what the job would cost (credits_estimate) and make nothing: nothing is queued, held or stored, and no Idempotency-Key is used",
       "default": false
      },
      "prompt": {
       "type": "string",
       "maxLength": 1500,
       "minLength": 1,
       "description": "What to create"
      },
      "reference_images": {
       "items": {
        "anyOf": [
         {
          "type": "string"
         },
         {
          "properties": {
           "file_id": {
            "anyOf": [
             {
              "type": "string",
              "maxLength": 64
             },
             {
              "type": "null"
             }
            ],
            "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
           },
           "url": {
            "anyOf": [
             {
              "type": "string",
              "maxLength": 2000
             },
             {
              "type": "null"
             }
            ],
            "description": "Public https:// URL to download"
           },
           "data": {
            "anyOf": [
             {
              "type": "string"
             },
             {
              "type": "null"
             }
            ],
            "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
           },
           "label": {
            "anyOf": [
             {
              "type": "string",
              "maxLength": 200
             },
             {
              "type": "null"
             }
            ],
            "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
           }
          },
          "type": "object",
          "description": "One input file. Give exactly one of file_id, url or data."
         }
        ]
       },
       "type": "array",
       "maxItems": 10,
       "description": "Up to 10 pictures to keep consistent: characters, products, places, styles"
      },
      "assets": {
       "items": {
        "type": "string"
       },
       "type": "array",
       "maxItems": 10,
       "description": "Approved library assets by handle, e.g. ['@maya', '@red_sofa']"
      },
      "aspect_ratio": {
       "type": "string",
       "enum": [
        "16:9",
        "9:16",
        "1:1",
        "4:3",
        "3:4"
       ],
       "default": "16:9"
      }
     },
     "required": [
      "prompt"
     ],
     "additionalProperties": false
    }
   }
  },
  {
   "type": "function",
   "function": {
    "name": "generate_video",
    "description": "Make a video: animate a picture, generate from text, copy a clip's motion (motion_video), extend a clip (extend_video) or make a character talk (voice + script). Returns a job; then call wait_for_job. Use dry_run: true or max_credits to control cost.",
    "parameters": {
     "type": "object",
     "properties": {
      "webhook_url": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 500
        },
        {
         "type": "null"
        }
       ],
       "description": "https:// URL that receives a signed POST when the job finishes"
      },
      "metadata": {
       "anyOf": [
        {
         "type": "object",
         "maxProperties": 16,
         "propertyNames": {
          "maxLength": 40
         },
         "additionalProperties": {
          "type": "string",
          "maxLength": 500
         }
        },
        {
         "type": "null"
        }
       ],
       "description": "Up to 16 keys (40 characters each) with string values (500 characters each), echoed back on the job and its webhook"
      },
      "name": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 80
        },
        {
         "type": "null"
        }
       ],
       "description": "Label shown in the BobaBanana studio"
      },
      "max_credits": {
       "anyOf": [
        {
         "type": "integer",
         "minimum": 0.0
        },
        {
         "type": "null"
        }
       ],
       "description": "Refuse the job (400 cost_above_max, nothing held) if it would cost more than this"
      },
      "dry_run": {
       "type": "boolean",
       "description": "true: answer 200 with what the job would cost (credits_estimate) and make nothing: nothing is queued, held or stored, and no Idempotency-Key is used",
       "default": false
      },
      "prompt": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 1500
        },
        {
         "type": "null"
        }
       ],
       "description": "The scene. Used to make the first frame when no image is given, and as the motion prompt when motion is empty."
      },
      "image": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        },
        {
         "type": "null"
        }
       ],
       "description": "Start frame to animate. If omitted, a first frame is generated from prompt + references."
      },
      "last_frame": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        },
        {
         "type": "null"
        }
       ],
       "description": "Last frame: the video moves from the first frame to this picture. Priced as a first + last frame video."
      },
      "extend_video": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        },
        {
         "type": "null"
        }
       ],
       "description": "Extend a clip: an mp4, mov or webm video of 15 seconds at most (url, or data up to about 25 MB). Its last frame becomes the start frame. Instead of image; priced as plain video unless last_frame is given."
      },
      "motion_video": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        },
        {
         "type": "null"
        }
       ],
       "description": "Motion transfer: a clip whose motion, performance and camera move are copied onto the subject in 'image' (or one asset in 'assets'). An mp4 or mov (H.264 or H.265), 1-15 seconds, 23.976-60 fps, each side at least 256 px, at most 50 MB (url, or data up to about 25 MB). The video is as long as the clip; duration_seconds is ignored. Made in the studio when it can be made in time, else with premium rendering; check cost.credits_estimate (the most it costs) or send max_credits."
      },
      "match_pose": {
       "type": "boolean",
       "description": "Motion transfer only: first redraw the subject in the poses, framing and shape of the clip's opening, middle and closing frames (the opening frame only for clips under 2 s; one opening-frame picture when the studio makes it; each a picture step at the picture price), and guide the video with those pictures. false sends the subject as it is (then only premium rendering can make it).",
       "default": true
      },
      "keep_sound": {
       "type": "boolean",
       "description": "Motion transfer only: put the clip's own sound on the result when the clip has sound.",
       "default": true
      },
      "first_shot_only": {
       "type": "boolean",
       "description": "Motion transfer only: when the clip has cuts (several scenes), make only its first shot, at the normal price of a clip that long. Without it every scene is made and joined under the clip's own sound, at 1.5x the normal price (see POST /v1/videos/estimate).",
       "default": false
      },
      "reference_images": {
       "items": {
        "anyOf": [
         {
          "type": "string"
         },
         {
          "properties": {
           "file_id": {
            "anyOf": [
             {
              "type": "string",
              "maxLength": 64
             },
             {
              "type": "null"
             }
            ],
            "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
           },
           "url": {
            "anyOf": [
             {
              "type": "string",
              "maxLength": 2000
             },
             {
              "type": "null"
             }
            ],
            "description": "Public https:// URL to download"
           },
           "data": {
            "anyOf": [
             {
              "type": "string"
             },
             {
              "type": "null"
             }
            ],
            "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
           },
           "label": {
            "anyOf": [
             {
              "type": "string",
              "maxLength": 200
             },
             {
              "type": "null"
             }
            ],
            "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
           }
          },
          "type": "object",
          "description": "One input file. Give exactly one of file_id, url or data."
         }
        ]
       },
       "type": "array",
       "maxItems": 10
      },
      "assets": {
       "items": {
        "type": "string"
       },
       "type": "array",
       "maxItems": 10
      },
      "motion": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 400
        },
        {
         "type": "null"
        }
       ],
       "description": "How things move, e.g. 'slow push-in, she turns and smiles'"
      },
      "duration_seconds": {
       "type": "number",
       "maximum": 15.0,
       "minimum": 2.0,
       "description": "2-10 s at 720p; 3-15 s at 1080p and 2160p (10 s at most with last_frame)",
       "default": 5
      },
      "aspect_ratio": {
       "type": "string",
       "enum": [
        "16:9",
        "9:16",
        "1:1",
        "4:3",
        "3:4"
       ],
       "default": "16:9"
      },
      "resolution": {
       "type": "string",
       "enum": [
        "720p",
        "1080p",
        "2160p"
       ],
       "description": "720p (standard), 1080p or 2160p (4K, made with premium rendering and priced from its live quote; 16:9 or 9:16; no voice or audio). Check cost.credits_estimate, or send max_credits.",
       "default": "720p"
      },
      "voice": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ]
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ]
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ]
          },
          "transcript": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 1000
            },
            {
             "type": "null"
            }
           ],
           "description": "Exact words spoken in the sample. If omitted, BobaBanana transcribes it first."
          }
         },
         "type": "object",
         "description": "A recording of the voice to clone: 5 to 30 seconds, one speaker, no music."
        },
        {
         "type": "null"
        }
       ],
       "description": "Voice to speak the script: '@handle' of a saved voice, or a sample to clone"
      },
      "voice_consent": {
       "type": "boolean",
       "description": "Required with an uploaded voice sample",
       "default": false
      },
      "script": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 600
        },
        {
         "type": "null"
        }
       ],
       "description": "Words the character says, lip-synced"
      },
      "audio": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        },
        {
         "type": "null"
        }
       ],
       "description": "Pre-recorded speech or soundtrack that drives the clip (instead of voice + script)"
      },
      "sound_effect": {
       "anyOf": [
        {
         "properties": {
          "prompt": {
           "type": "string",
           "maxLength": 300,
           "minLength": 1
          },
          "duration_seconds": {
           "type": "number",
           "maximum": 20.0,
           "minimum": 2.0,
           "default": 8
          }
         },
         "type": "object",
         "required": [
          "prompt"
         ]
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "required": [],
     "additionalProperties": false
    }
   }
  },
  {
   "type": "function",
   "function": {
    "name": "estimate_video",
    "description": "Price a motion transfer (a video with motion_video) before making it: scenes, multiplier, credits. Makes nothing.",
    "parameters": {
     "type": "object",
     "properties": {
      "webhook_url": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 500
        },
        {
         "type": "null"
        }
       ],
       "description": "https:// URL that receives a signed POST when the job finishes"
      },
      "metadata": {
       "anyOf": [
        {
         "type": "object",
         "maxProperties": 16,
         "propertyNames": {
          "maxLength": 40
         },
         "additionalProperties": {
          "type": "string",
          "maxLength": 500
         }
        },
        {
         "type": "null"
        }
       ],
       "description": "Up to 16 keys (40 characters each) with string values (500 characters each), echoed back on the job and its webhook"
      },
      "name": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 80
        },
        {
         "type": "null"
        }
       ],
       "description": "Label shown in the BobaBanana studio"
      },
      "max_credits": {
       "anyOf": [
        {
         "type": "integer",
         "minimum": 0.0
        },
        {
         "type": "null"
        }
       ],
       "description": "Refuse the job (400 cost_above_max, nothing held) if it would cost more than this"
      },
      "dry_run": {
       "type": "boolean",
       "description": "true: answer 200 with what the job would cost (credits_estimate) and make nothing: nothing is queued, held or stored, and no Idempotency-Key is used",
       "default": false
      },
      "prompt": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 1500
        },
        {
         "type": "null"
        }
       ],
       "description": "The scene. Used to make the first frame when no image is given, and as the motion prompt when motion is empty."
      },
      "image": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        },
        {
         "type": "null"
        }
       ],
       "description": "Start frame to animate. If omitted, a first frame is generated from prompt + references."
      },
      "last_frame": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        },
        {
         "type": "null"
        }
       ],
       "description": "Last frame: the video moves from the first frame to this picture. Priced as a first + last frame video."
      },
      "extend_video": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        },
        {
         "type": "null"
        }
       ],
       "description": "Extend a clip: an mp4, mov or webm video of 15 seconds at most (url, or data up to about 25 MB). Its last frame becomes the start frame. Instead of image; priced as plain video unless last_frame is given."
      },
      "motion_video": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        },
        {
         "type": "null"
        }
       ],
       "description": "Motion transfer: a clip whose motion, performance and camera move are copied onto the subject in 'image' (or one asset in 'assets'). An mp4 or mov (H.264 or H.265), 1-15 seconds, 23.976-60 fps, each side at least 256 px, at most 50 MB (url, or data up to about 25 MB). The video is as long as the clip; duration_seconds is ignored. Made in the studio when it can be made in time, else with premium rendering; check cost.credits_estimate (the most it costs) or send max_credits."
      },
      "match_pose": {
       "type": "boolean",
       "description": "Motion transfer only: first redraw the subject in the poses, framing and shape of the clip's opening, middle and closing frames (the opening frame only for clips under 2 s; one opening-frame picture when the studio makes it; each a picture step at the picture price), and guide the video with those pictures. false sends the subject as it is (then only premium rendering can make it).",
       "default": true
      },
      "keep_sound": {
       "type": "boolean",
       "description": "Motion transfer only: put the clip's own sound on the result when the clip has sound.",
       "default": true
      },
      "first_shot_only": {
       "type": "boolean",
       "description": "Motion transfer only: when the clip has cuts (several scenes), make only its first shot, at the normal price of a clip that long. Without it every scene is made and joined under the clip's own sound, at 1.5x the normal price (see POST /v1/videos/estimate).",
       "default": false
      },
      "reference_images": {
       "items": {
        "anyOf": [
         {
          "type": "string"
         },
         {
          "properties": {
           "file_id": {
            "anyOf": [
             {
              "type": "string",
              "maxLength": 64
             },
             {
              "type": "null"
             }
            ],
            "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
           },
           "url": {
            "anyOf": [
             {
              "type": "string",
              "maxLength": 2000
             },
             {
              "type": "null"
             }
            ],
            "description": "Public https:// URL to download"
           },
           "data": {
            "anyOf": [
             {
              "type": "string"
             },
             {
              "type": "null"
             }
            ],
            "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
           },
           "label": {
            "anyOf": [
             {
              "type": "string",
              "maxLength": 200
             },
             {
              "type": "null"
             }
            ],
            "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
           }
          },
          "type": "object",
          "description": "One input file. Give exactly one of file_id, url or data."
         }
        ]
       },
       "type": "array",
       "maxItems": 10
      },
      "assets": {
       "items": {
        "type": "string"
       },
       "type": "array",
       "maxItems": 10
      },
      "motion": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 400
        },
        {
         "type": "null"
        }
       ],
       "description": "How things move, e.g. 'slow push-in, she turns and smiles'"
      },
      "duration_seconds": {
       "type": "number",
       "maximum": 15.0,
       "minimum": 2.0,
       "description": "2-10 s at 720p; 3-15 s at 1080p and 2160p (10 s at most with last_frame)",
       "default": 5
      },
      "aspect_ratio": {
       "type": "string",
       "enum": [
        "16:9",
        "9:16",
        "1:1",
        "4:3",
        "3:4"
       ],
       "default": "16:9"
      },
      "resolution": {
       "type": "string",
       "enum": [
        "720p",
        "1080p",
        "2160p"
       ],
       "description": "720p (standard), 1080p or 2160p (4K, made with premium rendering and priced from its live quote; 16:9 or 9:16; no voice or audio). Check cost.credits_estimate, or send max_credits.",
       "default": "720p"
      },
      "voice": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ]
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ]
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ]
          },
          "transcript": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 1000
            },
            {
             "type": "null"
            }
           ],
           "description": "Exact words spoken in the sample. If omitted, BobaBanana transcribes it first."
          }
         },
         "type": "object",
         "description": "A recording of the voice to clone: 5 to 30 seconds, one speaker, no music."
        },
        {
         "type": "null"
        }
       ],
       "description": "Voice to speak the script: '@handle' of a saved voice, or a sample to clone"
      },
      "voice_consent": {
       "type": "boolean",
       "description": "Required with an uploaded voice sample",
       "default": false
      },
      "script": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 600
        },
        {
         "type": "null"
        }
       ],
       "description": "Words the character says, lip-synced"
      },
      "audio": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ],
           "description": "ID from POST /v1/files, e.g. file_3f9c2a1b7d4e"
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ],
           "description": "Public https:// URL to download"
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ],
           "description": "Base64 file contents, or a data: URI (about 25 MB at most)"
          },
          "label": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 200
            },
            {
             "type": "null"
            }
           ],
           "description": "What this reference shows, e.g. 'the red leather sofa'. Improves results with several references."
          }
         },
         "type": "object",
         "description": "One input file. Give exactly one of file_id, url or data."
        },
        {
         "type": "null"
        }
       ],
       "description": "Pre-recorded speech or soundtrack that drives the clip (instead of voice + script)"
      },
      "sound_effect": {
       "anyOf": [
        {
         "properties": {
          "prompt": {
           "type": "string",
           "maxLength": 300,
           "minLength": 1
          },
          "duration_seconds": {
           "type": "number",
           "maximum": 20.0,
           "minimum": 2.0,
           "default": 8
          }
         },
         "type": "object",
         "required": [
          "prompt"
         ]
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "required": [],
     "additionalProperties": false
    }
   }
  },
  {
   "type": "function",
   "function": {
    "name": "generate_speech",
    "description": "Speak text in a saved voice (@handle) or a voice cloned from a sample (needs voice_consent). Returns a job; then call wait_for_job.",
    "parameters": {
     "type": "object",
     "properties": {
      "webhook_url": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 500
        },
        {
         "type": "null"
        }
       ],
       "description": "https:// URL that receives a signed POST when the job finishes"
      },
      "metadata": {
       "anyOf": [
        {
         "type": "object",
         "maxProperties": 16,
         "propertyNames": {
          "maxLength": 40
         },
         "additionalProperties": {
          "type": "string",
          "maxLength": 500
         }
        },
        {
         "type": "null"
        }
       ],
       "description": "Up to 16 keys (40 characters each) with string values (500 characters each), echoed back on the job and its webhook"
      },
      "name": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 80
        },
        {
         "type": "null"
        }
       ],
       "description": "Label shown in the BobaBanana studio"
      },
      "max_credits": {
       "anyOf": [
        {
         "type": "integer",
         "minimum": 0.0
        },
        {
         "type": "null"
        }
       ],
       "description": "Refuse the job (400 cost_above_max, nothing held) if it would cost more than this"
      },
      "dry_run": {
       "type": "boolean",
       "description": "true: answer 200 with what the job would cost (credits_estimate) and make nothing: nothing is queued, held or stored, and no Idempotency-Key is used",
       "default": false
      },
      "text": {
       "type": "string",
       "maxLength": 600,
       "minLength": 1
      },
      "voice": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "properties": {
          "file_id": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 64
            },
            {
             "type": "null"
            }
           ]
          },
          "url": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 2000
            },
            {
             "type": "null"
            }
           ]
          },
          "data": {
           "anyOf": [
            {
             "type": "string"
            },
            {
             "type": "null"
            }
           ]
          },
          "transcript": {
           "anyOf": [
            {
             "type": "string",
             "maxLength": 1000
            },
            {
             "type": "null"
            }
           ],
           "description": "Exact words spoken in the sample. If omitted, BobaBanana transcribes it first."
          }
         },
         "type": "object",
         "description": "A recording of the voice to clone: 5 to 30 seconds, one speaker, no music."
        }
       ]
      },
      "voice_consent": {
       "type": "boolean",
       "default": false
      }
     },
     "required": [
      "text",
      "voice"
     ],
     "additionalProperties": false
    }
   }
  },
  {
   "type": "function",
   "function": {
    "name": "generate_sound_effect",
    "description": "Make a 2 to 20 second sound effect from a description. Returns a job; then call wait_for_job.",
    "parameters": {
     "type": "object",
     "properties": {
      "webhook_url": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 500
        },
        {
         "type": "null"
        }
       ],
       "description": "https:// URL that receives a signed POST when the job finishes"
      },
      "metadata": {
       "anyOf": [
        {
         "type": "object",
         "maxProperties": 16,
         "propertyNames": {
          "maxLength": 40
         },
         "additionalProperties": {
          "type": "string",
          "maxLength": 500
         }
        },
        {
         "type": "null"
        }
       ],
       "description": "Up to 16 keys (40 characters each) with string values (500 characters each), echoed back on the job and its webhook"
      },
      "name": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 80
        },
        {
         "type": "null"
        }
       ],
       "description": "Label shown in the BobaBanana studio"
      },
      "max_credits": {
       "anyOf": [
        {
         "type": "integer",
         "minimum": 0.0
        },
        {
         "type": "null"
        }
       ],
       "description": "Refuse the job (400 cost_above_max, nothing held) if it would cost more than this"
      },
      "dry_run": {
       "type": "boolean",
       "description": "true: answer 200 with what the job would cost (credits_estimate) and make nothing: nothing is queued, held or stored, and no Idempotency-Key is used",
       "default": false
      },
      "prompt": {
       "type": "string",
       "maxLength": 300,
       "minLength": 1,
       "description": "e.g. 'rain on a tin roof with distant thunder'"
      },
      "duration_seconds": {
       "type": "number",
       "maximum": 20.0,
       "minimum": 2.0,
       "default": 8
      }
     },
     "required": [
      "prompt"
     ],
     "additionalProperties": false
    }
   }
  },
  {
   "type": "function",
   "function": {
    "name": "wait_for_job",
    "description": "Get a job and wait up to 30 seconds for it to finish. Repeat until status is succeeded, failed or canceled; on succeeded, output holds signed download links.",
    "parameters": {
     "type": "object",
     "properties": {
      "job_id": {
       "type": "string",
       "description": "The job's id, e.g. x_8d21c0f4a9b3."
      },
      "wait": {
       "type": "integer",
       "maximum": 30,
       "minimum": 0,
       "description": "Seconds to wait for the job to finish before answering (0 to 30). The call returns as soon as the job finishes.",
       "default": 30
      }
     },
     "required": [
      "job_id"
     ],
     "additionalProperties": false
    }
   }
  },
  {
   "type": "function",
   "function": {
    "name": "upscale_job",
    "description": "Make a larger, sharper copy of a finished image or video job. Check get_upscale_options first. Returns a job; then call wait_for_job.",
    "parameters": {
     "type": "object",
     "properties": {
      "job_id": {
       "type": "string",
       "description": "The job's id, e.g. x_8d21c0f4a9b3."
      },
      "webhook_url": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 500
        },
        {
         "type": "null"
        }
       ],
       "description": "https:// URL that receives a signed POST when the job finishes"
      },
      "metadata": {
       "anyOf": [
        {
         "type": "object",
         "maxProperties": 16,
         "propertyNames": {
          "maxLength": 40
         },
         "additionalProperties": {
          "type": "string",
          "maxLength": 500
         }
        },
        {
         "type": "null"
        }
       ],
       "description": "Up to 16 keys (40 characters each) with string values (500 characters each), echoed back on the job and its webhook"
      },
      "name": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 80
        },
        {
         "type": "null"
        }
       ],
       "description": "Label shown in the BobaBanana studio"
      },
      "max_credits": {
       "anyOf": [
        {
         "type": "integer",
         "minimum": 0.0
        },
        {
         "type": "null"
        }
       ],
       "description": "Refuse the job (400 cost_above_max, nothing held) if it would cost more than this"
      },
      "dry_run": {
       "type": "boolean",
       "description": "true: answer 200 with what the job would cost (credits_estimate) and make nothing: nothing is queued, held or stored, and no Idempotency-Key is used",
       "default": false
      },
      "factor": {
       "type": "number",
       "description": "How much larger: 2 or 4 for an image job; 2, 2.25 (480p to 1080p) or 4 for a video job. GET /v1/jobs/{job_id}/upscale-options lists what a job allows and costs",
       "default": 2
      }
     },
     "required": [
      "job_id"
     ],
     "additionalProperties": false
    }
   }
  },
  {
   "type": "function",
   "function": {
    "name": "get_upscale_options",
    "description": "List the upscale factors a finished job allows and what each costs.",
    "parameters": {
     "type": "object",
     "properties": {
      "job_id": {
       "type": "string",
       "description": "The job's id, e.g. x_8d21c0f4a9b3."
      }
     },
     "required": [
      "job_id"
     ],
     "additionalProperties": false
    }
   }
  },
  {
   "type": "function",
   "function": {
    "name": "list_assets",
    "description": "Find approved library characters, objects, places and scenes to use by @handle.",
    "parameters": {
     "type": "object",
     "properties": {
      "kind": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "Only assets of this kind, e.g. human, nonhuman, object, place, scene or voice."
      },
      "search": {
       "anyOf": [
        {
         "type": "string",
         "maxLength": 100
        },
        {
         "type": "null"
        }
       ],
       "description": "Text to find in the name, handle or description (up to 100 characters)."
      },
      "limit": {
       "type": "integer",
       "maximum": 200,
       "minimum": 1,
       "description": "Assets per page (1 to 200).",
       "default": 50
      },
      "before": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "next_cursor from the previous page: returns the items after it."
      },
      "include": {
       "anyOf": [
        {
         "const": "sample",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "sample: add each voice's sample_url (a signed link to its recording)."
      }
     },
     "required": [],
     "additionalProperties": false
    }
   }
  },
  {
   "type": "function",
   "function": {
    "name": "list_voices",
    "description": "Find saved voices to use as voice: '@handle'.",
    "parameters": {
     "type": "object",
     "properties": {
      "limit": {
       "type": "integer",
       "maximum": 200,
       "minimum": 1,
       "description": "Voices per page (1 to 200).",
       "default": 200
      },
      "before": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "next_cursor from the previous page: returns the items after it."
      },
      "include": {
       "anyOf": [
        {
         "const": "sample",
         "type": "string"
        },
        {
         "type": "null"
        }
       ],
       "description": "sample: add each voice's sample_url (a signed link to its recording)."
      }
     },
     "required": [],
     "additionalProperties": false
    }
   }
  },
  {
   "type": "function",
   "function": {
    "name": "get_balance",
    "description": "Check the workspace's available credits before a costly job.",
    "parameters": {
     "type": "object",
     "properties": {},
     "required": [],
     "additionalProperties": false
    }
   }
  },
  {
   "type": "function",
   "function": {
    "name": "list_prices",
    "description": "Read the price table (credits per job kind).",
    "parameters": {
     "type": "object",
     "properties": {},
     "required": [],
     "additionalProperties": false
    }
   }
  }
 ]
}