BobaBanana API

GET /v1/status: check availability, your queue and prices

GET /v1/status is the endpoint to check availability, your queue and prices. Free. Says which kinds of generation are available now, how many of your workspace's steps are unfinished, typical durations in seconds and the price table. Call it before a batch, or after a 503.

View as Markdown

At a glance

Endpoint
GET /v1/status
Base URL
https://bobabanana.com/api/v1
Auth
Authorization: Bearer bb_...
Success
200
Safe to retry
yes, a read
Guide
Credits

Request#

Headers#

Headers
Header Required Description
Authorization yes Bearer bb_...: your API key (or send X-API-Key: bb_...)

Example request#

curl
curl https://bobabanana.com/api/v1/status \
  -H "Authorization: Bearer $BOBABANANA_API_KEY"
Python
import os

import requests

r = requests.get(
    "https://bobabanana.com/api/v1/status",
    headers={"Authorization": f"Bearer {os.environ['BOBABANANA_API_KEY']}"},
    timeout=60,
)
r.raise_for_status()
print(r.json())
JavaScript
const res = await fetch("https://bobabanana.com/api/v1/status", {
  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 (Status): Successful Response

{
  "object": "status",
  "your_queue_length": 2,
  "engines": {
    "image": {
      "available": true
    },
    "video": {
      "available": true
    },
    "speech": {
      "available": true
    },
    "sound_effect": {
      "available": true
    }
  },
  "typical_seconds": {
    "image": 60,
    "video": 240,
    "speech": 20,
    "sound_effect": 15
  },
  "prices": [
    {
      "key": "image",
      "base_credits": 4,
      "per_second_credits": 0,
      "per_100_chars_credits": 0,
      "pricing": "fixed"
    },
    {
      "key": "video",
      "base_credits": 6,
      "per_second_credits": 2,
      "per_100_chars_credits": 0,
      "pricing": "fixed"
    }
  ]
}

Errors#

Errors use the error object. The codes this endpoint can return (what to do about each is in Error codes):

Errors
Status Code Meaning
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.