create_bucket
Create a bucket in the signed-in Qencode account.
Writes only inside that account. The only inputs are a bucket name and a
region: no URL, no hostname, and no other storage provider. `region` must
be `us-west` or `eu-central`. A name owned by another account fails with
`bucket_conflict` and creates nothing. A name this account already has
returns `status: "exists"` and does not replace the bucket.
Call this ONLY on an explicit request to create a bucket or to keep a
result long-term. Do NOT call it just because a transcoding request lacks a
`destination`, or because the user says they have no bucket / nowhere to
save the output — that is the default temp-storage case: omit `destination`
(24-hour temp storage) and disclose it, do not provision an account-level
bucket the user did not ask for.
The bucket belongs to the whole Qencode account and is visible to every
project on that account, not just the current one. The call uses the
caller's existing Qencode sign-in. There is no separate storage permission.
Args:
name: 6–63 chars, lowercase letters / digits / hyphens
(`^[a-z0-9][a-z0-9-]{4,61}[a-z0-9]$`) — no underscores or uppercase.
A name that breaks this pattern is rejected (`invalid_bucket_name`).
region: `us-west` or `eu-central` only.
Returns `{bucket, region, status, destination_prefix}` plus `cdn_origin`
only after this account's CDN name is ready (a fresh bucket usually omits
it until then):
- `status: "created"` — a new bucket was provisioned in this account.
- `status: "exists"` — this account already has that name (no-op).
Copy `destination_prefix` into job `destination.url` as
`{destination_prefix}/{new filename or folder}`. Do not assemble the
host and do not copy a listed file's `destination_url` as dest.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Bucket name: lowercase letters, digits, and hyphens only. | |
| region | Yes | Storage region for the bucket. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| bucket | Yes | ||
| region | Yes | ||
| status | Yes | ||
| cdn_origin | No | ||
| destination_prefix | No |