templates

Create template (v3)

Changed on

Create a new template

post/v3/templates

Request

  • Base URL
    https://api.e2b.app
  • URL
    https://api.e2b.app/v3/templates
  • Auth
    • API key in header X-API-Key
    • or HTTP bearer and API key in header X-Team-ID
    • or API key in header X-Admin-Token and API key in header X-Team-ID
    • or HTTP bearer and API key in header X-Team-ID

Request body

namestring

Name of the template. Can include a tag with colon separator (e.g. "my-template" or "my-template:v1"). If tag is included, it will be treated as if the tag was provided in the tags array.

tagsstring[]

Tags to assign to the template build

aliasstring

Alias of the template. Deprecated, use name instead.

teamIDstring

Identifier of the team, as its UUID or its public project ID (prj_)

cpuCountinteger

CPU cores for the sandbox

memoryMBinteger

Memory for the sandbox in MiB

minFreeDiskMbinteger

Requested minimum free space after the template's build steps, in MiB. Omit to use the team's default. Set to 0 to request no minimum free-disk growth. The filesystem is never shrunk, including inherited or already-larger filesystems. Growth is best effort, so filesystem metadata can leave the available space slightly below the requested minimum.

Response

The build was requested successfully

templateIDstring required

Identifier of the template

buildIDstring required

Identifier of the last successful build for given template

publicboolean required

Whether the template is public or only accessible by the team

namesstring[] required

Names of the template

tagsstring[] required

Tags assigned to the template build

aliasesstring[] required

Aliases of the template

Changes