containers

`POST /v1/containers` — create an unattached container.

Changed on
post/api/v1/containers

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/v1/containers
  • Auth: HTTP bearer

Request body

file_idsstring[]

Files-API ids to copy into /mnt/data at container creation. Spec: CreateContainerBody.file_ids. Each id is resolved via the Files API (same path as input_file parts on a response request) and the bytes are persisted into container_files so the model can read them on first attach.

memory_limitstring nullable

Optional memory ceiling. Accepts OpenAI's "1g" / "512m" strings; parsed case-insensitively. Capped by the operator's [features.server_tools.shell_limits].max_mem_limit_mb.

namestring nullable

Optional display name (max 255 chars).

network_policyobject

Optional network policy (same shape as tools.shell.environment.network_policy). OpenAI types this as a oneOf { Disabled, Allowlist } discriminated by type; Hadrian represents it as a single flat object that validates the same constraints at request resolution, so the schema is rendered as an opaque object to avoid spurious diffs.

skillsobject[]

Skills to mount whenever a session is booted against this container. Matches OpenAI's typed shape — see [crate::api_types::RequestSkill].

Response

The created container metadata

Changes