canonical: https://jentic.com/apis/backblaze.com/backblaze

# Backblaze B2 Cloud Storage API

Jentic publishes the only available OpenAPI specification for Backblaze B2 Cloud Storage API, keeping it validated and agent-ready. Store and retrieve objects in B2 cloud storage with 24 endpoints covering bucket management, file upload and download, application key administration, and large file multipart operations. Pricing runs at one-quarter the cost of major cloud providers with no egress fees for partner integrations and S3-compatible access.

## For AI agents

Upload, download, and manage objects in Backblaze B2 cloud storage. Create buckets, generate upload URLs, and handle multipart uploads for large files with application key-based access control.

## Scope

Does not handle CDN delivery, image transformations, or database storage - use for raw object storage and retrieval only.

## Capabilities

- Upload files to B2 buckets using pre-authorized upload URLs with SHA-1 integrity verification
- Download files by ID or by bucket-name-plus-path with byte-range support for partial retrieval
- Split files over 100 MB into parts for parallel multipart upload with independent retry per part
- Generate scoped application keys that restrict access to specific buckets, path prefixes, or operations
- Configure bucket lifecycle rules to automatically transition or delete objects after a defined period
- List file versions and hide specific versions to implement soft-delete without permanent removal

## Use cases

### AI Agent Backup Automation

AI agents automate backup workflows by uploading snapshots, database dumps, and log archives to B2 storage through Jentic. The agent searches for the upload intent, receives the two-step schema (get upload URL, then upload file), and executes without browsing documentation. Application keys scoped to a single bucket ensure agents cannot access unrelated data. At $0.006/GB/month storage, B2 is cost-effective for high-volume backup retention.

Example prompt: Call /b2_get_upload_url for bucket 'daily-backups', then upload a 50 MB database dump using /b2_upload_file with SHA-1 verification

### Large File Multipart Upload

Upload files larger than 100 MB using B2's multipart upload mechanism. Start a large file, obtain part upload URLs, upload each part independently (enabling parallel transfers), then finish the upload to assemble the final object. Failed parts can be retried individually without re-uploading the entire file. The API tracks unfinished large files for cleanup.

Example prompt: Start a large file with /b2_start_large_file, get part URLs with /b2_get_upload_part_url, upload 3 parts, then finalize with /b2_finish_large_file

### Application Key Access Control

Generate scoped application keys that limit API access to specific buckets, file path prefixes, or operation sets. Distribute keys to different services or agents with least-privilege permissions. Keys can be created with expiration timestamps and restricted to read-only or write-only operations, preventing accidental data deletion from automated systems.

Example prompt: Create a read-only application key scoped to bucket 'public-assets' with prefix 'images/' using /b2_create_key

### Cost-Effective Media Asset Storage

Store media files - images, videos, audio - at a fraction of the cost of major cloud providers. B2 charges $0.006/GB/month for storage with free egress through CDN partners (Cloudflare, Fastly). Files are accessed by ID for direct download or by bucket name and file path. Lifecycle rules auto-delete temporary assets after a configured retention period.

Example prompt: List all files with prefix 'videos/' in bucket 'media-assets' using /b2_list_file_names and retrieve metadata for the most recent upload with /b2_get_file_info

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /b2_authorize_account | Authenticate and receive API URL and auth token |
| POST | /b2_get_upload_url | Get a URL for uploading files to a bucket |
| POST | /b2_upload_file | Upload a file to the bucket using the authorized URL |
| POST | /b2_download_file_by_id | Download a file by its unique file ID |
| POST | /b2_list_file_names | List file names in a bucket with optional prefix filter |
| POST | /b2_create_bucket | Create a new storage bucket |
| POST | /b2_create_key | Create a new application key with scoped permissions |
| POST | /b2_start_large_file | Begin a multipart upload for a large file |

## Key resources

- **Buckets** — Create, list, update, and delete storage buckets with lifecycle rules and CORS settings
- **Files** — Upload, download, list, copy, hide, and delete individual files with version tracking
- **Keys** — Create, list, and delete application keys with bucket and prefix scoping
- **Large Files** — Start, upload parts, finish, or cancel multipart uploads for files over 100 MB

## Why Jentic

- **Setup:** Wiring Backblaze B2 by hand means running the /b2_authorize_account HTTP Basic handshake yourself, then carrying the returned API URL and auth token through every later call, plus managing the separate get-upload-URL step and SHA-1 verification. Through Jentic you install once, import the Backblaze B2 Cloud Storage API from the API Directory, store the application key ID and key once, and your agent calls it.
- **Permission scoping:** B2 write operations like /b2_upload_file and /b2_create_bucket carry the bucket and file details in the request body rather than in the URL path, so scoping is by operation: limit the agent to the operations it needs, such as /b2_get_upload_url and /b2_upload_file. You choose those operations, so destructive ones like /b2_delete_bucket or /b2_delete_key are not included unless you add them.
- **Credential handling:** Your Backblaze application key ID and key are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'upload a backup file to cloud storage' or 'list files in a bucket', and Jentic returns the matching B2 operation with its input schema, including the two-step get-URL-then-upload flow, so the agent calls the right endpoint without reading the docs.

## Related APIs

- **Google Cloud Storage** — Multi-tier object storage with tight GCP integration and global redundancy options
- **Cloudflare API** — CDN, DNS, and edge computing platform for content delivery
- **Cloudinary Admin API** — Media asset management with on-the-fly image and video transformations

## FAQ

### Why is there no official OpenAPI spec for Backblaze B2 Cloud Storage API?

Backblaze does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Backblaze B2 Cloud Storage API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Backblaze B2 API use?

The B2 API uses HTTP Basic authentication for the initial /b2_authorize_account call, where the username is the application key ID and the password is the application key. This returns an authorization token and API URL used for all subsequent requests. Through Jentic, these credentials are stored encrypted in your Jentic One instance.

### Can I upload files larger than 100 MB with the B2 API?

Yes. Files under 100 MB use the single-call /b2_upload_file endpoint. Larger files use the multipart flow: /b2_start_large_file to initiate, /b2_get_upload_part_url for each part URL, upload parts individually (minimum 5 MB each except the last), then /b2_finish_large_file to assemble. Maximum file size is 10 TB.

### How do I list files in a B2 bucket through Jentic?

Search Jentic for 'list files in a Backblaze bucket' to load the /b2_list_file_names operation schema. Pass the bucketId and optional prefix/delimiter parameters to filter results. The endpoint returns up to 10,000 files per call with a nextFileName cursor for pagination. Install with pip install jentic.

### What are the rate limits for the Backblaze B2 API?

B2 allows unlimited API calls for most read operations. Write operations are limited to approximately 100 calls per second per account. The /b2_authorize_account endpoint is limited to prevent brute-force attacks. The API returns HTTP 429 or 503 with a Retry-After header when limits are hit.

### How does B2 pricing compare to other cloud storage providers?

B2 storage costs $0.006/GB/month - roughly one-quarter the price of AWS S3 Standard. Download bandwidth is $0.01/GB, and egress through CDN partners (Cloudflare, Fastly, Bunny) is free. There are no minimum storage durations or per-request charges for standard operations.

### Can I limit what my agent is allowed to do with the Backblaze B2 Cloud Storage API?

Yes. Because you run Jentic One yourself, your own rules decide which B2 operations and credentials the agent can use, and scoping here is by operation since B2 write calls like /b2_upload_file and /b2_create_bucket carry the bucket and file details in the request body rather than the URL path. You can allow the agent only the operations it needs, such as /b2_get_upload_url and /b2_upload_file, and destructive ones like /b2_delete_bucket or /b2_delete_key stay excluded unless you add them. Your Backblaze application key ID and key are stored encrypted by your own instance and injected at execution time, so they never enter the agent's prompt or logs.
