Buble (buble v0.1.0)

Copy Markdown View Source

Server-side Elixir SDK for the Buble public API.

Buble provides AI chat, image generation, video generation, file uploads, and preconfigured AI app workflows. The Buble API documentation describes authentication, model discovery, file uploads, asynchronous generation tasks, app workflows, polling, and chat model endpoints.

Quick start

client = Buble.Client.new!(api_key: "sk_...")

{:ok, task} =
  Buble.Generations.create(client, %{
    model: "nano-banana",
    prompt: "A cinematic studio product photo"
  })

{:ok, result} = Buble.Generations.wait(client, task["data"]["id"])

The SDK also reads BUBLE_API_KEY and BUBLE_BASE_URL from the environment when omitted.

Summary

Functions

client(opts \\ [])

@spec client(keyword()) :: {:ok, Buble.Client.t()} | {:error, Buble.Error.t()}

Creates a Buble.Client.

client!(opts \\ [])

@spec client!(keyword()) :: Buble.Client.t()

Creates a Buble.Client or raises Buble.Error.