Expand description
Server-side Rust SDK for the Buble public API.
Buble is available at Buble. The Buble API documentation describes the supported endpoints, request shapes, authentication model, and model-specific parameters.
The SDK supports media model discovery, file uploads, asynchronous image and video generation, preconfigured app workflows, and chat model calls through OpenAI, Anthropic Messages, and Gemini-compatible API formats.
Use Client::from_env to construct a client from BUBLE_API_KEY and
optional BUBLE_BASE_URL, or Client::builder for explicit configuration.
Generation requests use Buble’s flat public API shape. Stable generation
fields are represented directly on CreateGenerationRequest, and
model-specific parameters are passed through CreateGenerationRequest::param
so newly configured Buble models can be used without requiring an SDK release.
API keys are server credentials. Do not expose them in browser or other client-side code.
Structs§
- ApiError
- API error returned for non-2xx Buble API responses.
- AppGeneration
Task - App generation task.
- AppGenerations
Service - App generation task methods.
- AppInput
Parameter - App input parameter.
- Apps
Service - Preconfigured app workflow methods.
- Chat
Completions Service - OpenAI-compatible chat completion methods.
- Chat
Model - Callable chat model.
- Chat
Model List - OpenAI-style model list returned by chat model discovery.
- Chat
Models Service - Chat model discovery methods.
- Chat
Service - Chat model methods for OpenAI, Anthropic, and Gemini-compatible APIs.
- Client
- Server-side client for the Buble public API.
- Client
Builder - Builder for
Client. - Create
Generation Request - Creates an asynchronous media generation task.
- Envelope
- Common response shape for Buble media, file, and app endpoints.
- Files
Service - Source media upload methods.
- Gemini
Service - Gemini-compatible content generation methods.
- Generation
Result - Generated media assets.
- Generation
Task - Direct media generation task.
- Generation
Task Error - Task-level generation error.
- Generations
Service - Direct media generation methods.
- List
Apps Params - Query parameters for app listing.
- Media
Model - API-ready media model returned by model discovery.
- Media
Model Operation - Public operation mode for a media model.
- Media
Model Parameter - Request parameter accepted by a model mode.
- Media
Models Service - Media model discovery methods.
- Media
Result Audio - Generated audio asset.
- Media
Result Image - Generated image asset.
- Media
Result Video - Generated video asset.
- Messages
Service - Anthropic Messages-compatible methods.
- Public
App - Callable Buble app workflow.
- SseEvent
- Parsed server-sent event.
- Upload
Options - Optional upload validation fields.
- Uploaded
File - Uploaded source asset.
- Wait
Options - Polling options for wait helpers.
Enums§
- Error
- Error type returned by the Buble Rust SDK.
- File
Upload - File source for uploads to Buble.
- Stream
Protocol - Protocol shape used to extract text from SSE payloads.
- Task
Status - Lifecycle status of an asynchronous generation task.
Constants§
- DEFAULT_
BASE_ URL - Default Buble public API base URL.
- DEFAULT_
TIMEOUT - Default request timeout.
Type Aliases§
- Chat
Request - Flexible chat request body.
- Chat
Response - Protocol-native chat response body.
- Event
Stream - Stream of parsed server-sent events.
- Result
- SDK result type.
- Text
Stream - Stream of extracted text chunks.