> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blobhub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# blobhub blob create

> Create a private blob of any type and wait until it is ready

`blob create` makes a blob of the type you name and returns once it is ready, so the next command has something to
write to. It is the only command in the `blob` group that writes, and the one to run before `workflow push`, which
never creates a blob.

## Synopsis

```bash theme={null}
blobhub blob create <blob> --type <type-id>
```

| Argument or flag | Default | Description |
| - | - | - |
| `blob` | required | Blob as `<org>/<name>`, or a bare name with `--org`. |
| `--type` | required | The blob type id, dotted, as `blobhub.compute.workflow`. |

`--org`, `--profile` and `--json` are [global](https://docs.blobhub.io/cli/configuration.md#global-flags), so they go **before** the
subcommand:

```bash theme={null}
# a bare name inherits the org from --org, or from BLOBHUB_ORG
blobhub --org acme blob create service-desk-agent --type blobhub.compute.workflow
```

The command has no `--dry-run`, no description and no `--public`.

## What it does

1. Parses the reference. A bare name takes the org from `--org` or `BLOBHUB_ORG`. The name is checked before
   anything is sent: it must match `^[a-z0-9_-]{6,42}$` and must not be UUID-shaped.
2. Posts the create. It never reads first, so it never reuses a blob: a name the organization already holds is
   `BLOB_ALIAS_IN_USE`, readable or not. The platform checks the key's access, then the type, then the quota, and
   the name last, so `ORG_NOT_WRITABLE`, `BLOB_TYPE_UNAVAILABLE` or `LIMIT_EXCEEDED` comes first when one applies.
3. Reads the blob back by id each second, for up to 120 s, until it is `ready`.
4. Prints the result.

The `--type` value goes to the platform verbatim. The platform decides which types exist and which an organization
may create.

## Always private

A blob made here is `private`, and the command has no way to change that. Publishing is a person's change on the
organization's perimeter; see [the access perimeter](https://docs.blobhub.io/general/service-accounts.md#the-access-perimeter).

## Output

```text theme={null}
created acme/service-desk-agent, private
Id:          <blob id>
Type:        blobhub.compute.workflow
Default:     <revision id>
```

Under `--json` the payload carries `blob` (the `<org>/<name>` label), `blob_id`, `revision_id`, `record` (the
blob record) and the envelope's `schema_version`.

## Errors

| Code | When |
| - | - |
| `BLOB_REFERENCE_INVALID` | The name is not one the alias grammar accepts (`blob name 'X' must match '^[a-z0-9_-]{6,42}$' and must not be UUID-shaped`), or the reference is empty, malformed, or a bare name with no `--org` and no `BLOBHUB_ORG` (the hint is `blobhub --org <org> blob create --type <type> <name>`). |
| `BLOB_ALIAS_IN_USE` | The organization already holds a blob of that name: `blob <org>/<name> already exists; blob create never reuses a blob`. The hint is `blobhub blob show <org>/<name>`. |
| `BLOB_TYPE_UNAVAILABLE` | No such type is registered (`cannot create <org>/<name>: no blob type 'workflow' is available to <org>; a type id is dotted, as blobhub.compute.workflow`), or the organization may not create it (`cannot create <org>/<name>: This organization cannot create <type> blobs (<type>.enabled).`, with `--json` adding `limit`). |
| `ORG_NOT_WRITABLE` | The platform answered `403`: the organization is absent, or this key is not its admin. The hint is `blobhub whoami`. A `401` stays `AUTH_INVALID`. |
| `LIMIT_EXCEEDED` | The organization is at its blob quota, `platform.blobs_per_org`, even when the name is one it already holds. `--json` carries `limit` as `{id, value, held}`. |
| `BLOB_NOT_READY` | The blob is `failed`, or still `creating_blob` after 120 s. The hint is `blobhub blob show <org>/<name>`. |
| `CREDENTIALS_NOT_FOUND` | No API key from flags, environment, or credentials file. |
| `PROFILE_NOT_FOUND` | `BLOBHUB_PROFILE` names a profile that is not stored. |
| `INSECURE_CREDENTIALS_PERMISSIONS` | `credentials.yaml` is readable by group or other. |
| `API_RATE_LIMITED`, `API_TRANSIENT_ERROR`, `API_NETWORK_ERROR` | The call failed, after its retries. |

Like every write, the create is retried only when the failure proves it never ran: an HTTP 429, or a connection that was
never made. `blob create` never reuses a blob it finds, so it is the one write command besides `workflow execute` that
does not converge when rerun: when its answer is lost after the platform created the blob, a rerun is refused
`BLOB_ALIAS_IN_USE`, and `blobhub blob show <org>/<name>` tells whether it was made.

## See also

* [`blobhub blob show`](https://docs.blobhub.io/cli/blob/show) — the record and default revision of a blob that exists.
* [`blobhub workflow push`](https://docs.blobhub.io/cli/workflow/commands/push) — writes a definition into a blob; it never creates one.
* [Create Blob](https://docs.blobhub.io/rest-api/orgs/create-blob.md) — the route behind the command.
* [Error codes](https://docs.blobhub.io/cli/error-codes.md) — the full catalog behind the table above, remediation included.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.