v18

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-014211,6201.8 MB
gitpod.v1.PrebuildService

CreatePrebuild

Creates a prebuild for a project.

Use this method to:

  • Create on-demand prebuilds for faster environment startup
  • Trigger prebuilds after repository changes
  • Generate prebuilds for specific environment classes

The prebuild process creates an environment, runs the devcontainer prebuild lifecycle, and creates a snapshot for future environment provisioning.

Examples

  • Create basic prebuild:

    Creates a prebuild for a project using default settings.

    projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
    spec:
      timeout: "3600s"  # 60 minutes default
    
  • Create prebuild with custom environment class:

    Creates a prebuild with a specific environment class and timeout.

    projectId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
    environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
    spec:
      timeout: "3600s"  # 1 hour
    
post/gitpod.v1.PrebuildService/CreatePrebuild

Request body

environmentClassIdstring uuid nullable

environment_class_id specifies which environment class to use for the prebuild. If not specified, uses the project's default environment class.

projectIdstring uuid required

project_id specifies the project to create a prebuild for

Response

Success