GET /v1/jobs: list jobs
GET /v1/jobs is the endpoint to list your jobs, newest first. Jobs of the calling key, newest first, filtered by status and type. Pages hold limit jobs; when has_more is true, pass next_cursor as before for the next page.
At a glance
- Endpoint
GET /v1/jobs- Base URL
https://bobabanana.com/api/v1- Auth
Authorization: Bearer bb_...- Success
200- Safe to retry
- yes, a read
- Guide
- Jobs
Request#
Query parameters#
| Name | Type | Required | Default | Limits | Description |
|---|---|---|---|---|---|
status |
one of queued, running, succeeded, failed, canceled |
no | Only jobs with this status. | ||
type |
one of image, video, speech, sound_effect, image_upscale, video_upscale |
no | Only jobs of this type. | ||
limit |
integer | no | 20 |
1 to 100 | Jobs per page (1 to 100). |
before |
string | no | next_cursor from the previous page: returns the items after it. |
Headers#
| Header | Required | Description |
|---|---|---|
Authorization |
yes | Bearer bb_...: your API key (or send X-API-Key: bb_...) |
Example request#
curl https://bobabanana.com/api/v1/jobs?status=succeeded&limit=20 \
-H "Authorization: Bearer $BOBABANANA_API_KEY"
import os
import requests
r = requests.get(
"https://bobabanana.com/api/v1/jobs?status=succeeded&limit=20",
headers={"Authorization": f"Bearer {os.environ['BOBABANANA_API_KEY']}"},
timeout=60,
)
r.raise_for_status()
print(r.json())
const res = await fetch("https://bobabanana.com/api/v1/jobs?status=succeeded&limit=20", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.BOBABANANA_API_KEY}`,
},
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
console.log(await res.json());
Response#
200: Successful Response
{
"object": "list",
"data": [
{
"id": "x_8d21c0f4a9b3",
"object": "job",
"type": "image",
"status": "succeeded",
"created": 1764950400,
"finished": 1764950472,
"input": {
"reference_images": [
{
"file_id": "file_3f9c2a1b7d4e",
"label": "a mustard yellow three-seat sofa"
}
],
"assets": [],
"prompt": "the sofa in a sunlit loft, morning light, wide shot",
"aspect_ratio": "16:9"
},
"output": {
"image": {
"url": "https://bobabanana.com/api/v1/files/content/...",
"content_type": "image/png"
}
},
"cost": {
"credits_estimate": 4,
"credits_charged": 4,
"credits_released": 0,
"status": "charged"
}
}
],
"has_more": true,
"next_cursor": "x_8d21c0f4a9b3"
}
Errors#
Errors use the error object. The codes this endpoint can return (what to do about each is in Error codes):
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_cursor |
before is not a cursor from this list. |
| 400 | invalid_request |
A field is missing, has the wrong type or breaks a rule. param names the field. Type and range problems found while reading the body are 422 with the same code. |
| 401 | invalid_api_key |
The key is wrong, revoked or belongs to no workspace. |
| 401 | missing_api_key |
No API key was sent. |
| 403 | workspace_suspended |
The workspace that owns the key is suspended. |
| 429 | too_many_attempts |
Too many requests with wrong keys came from your address. Retry-After is set. |
| 500 | internal_error |
Something went wrong on our side. |
Related#
- Guide: Jobs
- All endpoints
- Objects
- Error codes