---
title: "Create container"
method: POST
path: "/containers"
---

# Create container

`POST /containers`

Create Container

## Request body

- CreateContainerBody
  - `name` string, required — Name of the container to create.
  - `file_ids` string[] — IDs of files to copy to the container.
  - `expires_after` object — Container expiration time in seconds relative to the 'anchor' time.
    - `anchor` 'last_active_at', required — Time anchor for the expiration time. Currently only 'last_active_at' is supported.
    - `minutes` integer, required
  - `skills` union[] — An optional list of skills referenced by id or inline data.
    - union
      - SkillReferenceParam
        - `type` 'skill_reference', required — References a skill created with the /v1/skills endpoint.
        - `skill_id` string, required — The ID of the referenced skill.
        - `version` string — Optional skill version. Use a positive integer or 'latest'. Omit for default.
      - InlineSkillParam
        - `type` 'inline', required — Defines an inline skill for this request.
        - `name` string, required — The name of the skill.
        - `description` string, required — The description of the skill.
        - `source` InlineSkillSourceParam, required — Inline skill payload
          - `type` 'base64', required — The type of the inline skill source. Must be `base64`.
          - `media_type` 'application/zip', required — The media type of the inline skill payload. Must be `application/zip`.
          - `data` string, required — Base64-encoded skill zip bundle.
  - `memory_limit` '1g' | '4g' | '16g' | '64g' — Optional memory limit for the container. Defaults to "1g".
  - `network_policy` union — Network access policy for the container.
    - ContainerNetworkPolicyDisabledParam
      - `type` 'disabled', required — Disable outbound network access. Always `disabled`.
    - ContainerNetworkPolicyAllowlistParam
      - `type` 'allowlist', required — Allow outbound network access only to specified domains. Always `allowlist`.
      - `allowed_domains` string[], required — A list of allowed domains when type is `allowlist`.
      - `domain_secrets` ContainerNetworkPolicyDomainSecretParam[] — Optional domain-scoped secrets for allowlisted domains.
        - `domain` string, required — The domain associated with the secret.
        - `name` string, required — The name of the secret to inject for the domain.
        - `value` string, required — The secret value to inject for the domain.

## Response `200`

Success

- ContainerResource
  - `id` string, required — Unique identifier for the container.
  - `object` string, required — The type of this object.
  - `name` string, required — Name of the container.
  - `created_at` integer, required — Unix timestamp (in seconds) when the container was created.
  - `status` string, required — Status of the container (e.g., active, deleted).
  - `last_active_at` integer — Unix timestamp (in seconds) when the container was last active.
  - `expires_after` object — The container will expire after this time period. The anchor is the reference point for the expiration. The minutes is the number of minutes after the anchor before the container expires.
    - `anchor` 'last_active_at' — The reference point for the expiration.
    - `minutes` integer — The number of minutes after the anchor before the container expires.
  - `memory_limit` '1g' | '4g' | '16g' | '64g' — The memory limit configured for the container.
  - `network_policy` object — Network access policy for the container.
    - `type` 'allowlist' | 'disabled', required — The network policy mode.
    - `allowed_domains` string[] — Allowed outbound domains when `type` is `allowlist`.

---

[API](https://skmtc.net/openai/apis/openai-api.md) · [All operations](https://skmtc.net/openai/apis/openai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openai/openai-api/versions/dcd35773a322/schema)
