# BobaBanana API reference: every endpoint, parameter and object

Source: https://bobabanana.com/docs/api/reference/

> All BobaBanana API endpoints by group: generate, jobs, files, library and account, each with parameters, examples in three languages, responses and errors.

**The BobaBanana API has 21 operations under `https://bobabanana.com/api/v1`, grouped below by what they do.** Each page lists the parameters, body fields, an example in curl, Python and JavaScript, the response and the errors. All of it is generated from the [OpenAPI 3.1 spec](https://bobabanana.com/docs/openapi.json).

**At a glance**

- **Base URL:** `https://bobabanana.com/api/v1`
- **Auth:** `Authorization: Bearer bb_...`
- **Format:** JSON in and out; uploads are multipart
- **Spec:** [openapi.json](https://bobabanana.com/docs/openapi.json)
- **Objects:** [Job, File, Asset, Error and more](https://bobabanana.com/docs/api/reference/objects/)

## Generate

Create jobs.

| Method | Path | What it does |
|---|---|---|
| `POST` | [`/v1/images`](https://bobabanana.com/docs/api/reference/create-image/) | Create an image job |
| `POST` | [`/v1/videos`](https://bobabanana.com/docs/api/reference/create-video/) | Create a video job |
| `POST` | [`/v1/videos/estimate`](https://bobabanana.com/docs/api/reference/estimate-video/) | Price a motion transfer before you send it |
| `POST` | [`/v1/speech`](https://bobabanana.com/docs/api/reference/create-speech/) | Create a speech job |
| `POST` | [`/v1/sound-effects`](https://bobabanana.com/docs/api/reference/create-sound-effect/) | Create a sound effect job |
| `GET` | [`/v1/jobs/{job_id}/upscale-options`](https://bobabanana.com/docs/api/reference/get-upscale-options/) | List upscale sizes and prices for a job |
| `POST` | [`/v1/jobs/{job_id}/upscale`](https://bobabanana.com/docs/api/reference/upscale-job/) | Upscale a finished image or video job |

## Jobs

Follow and manage jobs.

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/jobs`](https://bobabanana.com/docs/api/reference/list-jobs/) | List your jobs, newest first |
| `GET` | [`/v1/jobs/{job_id}`](https://bobabanana.com/docs/api/reference/get-job/) | Get a job, or wait for it to finish |
| `DELETE` | [`/v1/jobs/{job_id}`](https://bobabanana.com/docs/api/reference/delete-job/) | Delete a finished job and its results |
| `POST` | [`/v1/jobs/{job_id}/cancel`](https://bobabanana.com/docs/api/reference/cancel-job/) | Cancel a queued or running job |
| `POST` | [`/v1/jobs/{job_id}/webhook/replay`](https://bobabanana.com/docs/api/reference/replay-webhook/) | Send a finished job's webhook again |

## Files

Uploads.

| Method | Path | What it does |
|---|---|---|
| `POST` | [`/v1/files`](https://bobabanana.com/docs/api/reference/upload-file/) | Upload a reference image or audio file |
| `GET` | [`/v1/files/{file_id}`](https://bobabanana.com/docs/api/reference/get-file/) | Get an uploaded file |
| `DELETE` | [`/v1/files/{file_id}`](https://bobabanana.com/docs/api/reference/delete-file/) | Delete an uploaded file |

## Library

Assets and voices.

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/assets`](https://bobabanana.com/docs/api/reference/list-assets/) | List approved library assets |
| `GET` | [`/v1/assets/{handle}`](https://bobabanana.com/docs/api/reference/get-asset/) | Get one library asset |
| `GET` | [`/v1/voices`](https://bobabanana.com/docs/api/reference/list-voices/) | List saved voices |

## Account

Credits, prices and status.

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/status`](https://bobabanana.com/docs/api/reference/get-status/) | Check availability, your queue and prices |
| `GET` | [`/v1/balance`](https://bobabanana.com/docs/api/reference/get-balance/) | Get your workspace's credit balance |
| `GET` | [`/v1/prices`](https://bobabanana.com/docs/api/reference/list-prices/) | List the price of each kind of job |

## Webhook

`jobFinished`: the [event](https://bobabanana.com/docs/api/reference/objects/#event) BobaBanana POSTs to your `webhook_url` when a job finishes. See [Webhooks](https://bobabanana.com/docs/api/webhooks/).
