Skip to main content
POST
Create GitHub App

Authorizations

Authorization
string
header
required

Service Account Token authentication. To authenticate API requests:

  1. Create a Service Account Token:

    • Go to the Cerebrium Dashboard and open the API Keys page
    • Click Create Service Account, name it (e.g., "GitHub Actions CI/CD"), choose an expiry date, and click Create
    • Copy the token generated for the desired service account
  2. Use the Token: Include the service account token in the Authorization header of API requests: Authorization: Bearer <your-service-account-token>

  3. Best Practices:

    • Create separate service accounts for different environments (dev, staging, prod)
    • Store tokens securely as secrets in consuming applications or workflows
    • Set appropriate expiry dates and rotate tokens regularly
    • Never commit tokens to source control

For CI/CD integration examples, see the CI/CD documentation.

Path Parameters

project_id
string
required

Body

application/json
cliVersion
string
required

Version of the client initiating the deployment.

githubRepo
string
required

GitHub repository to deploy from, in owner/repo format.

name
string
required

The name of the app. 3-30 lowercase alphanumeric characters and dashes.

baseImage
string

Base Docker image for the app. Default: debian:bookworm-slim.

cerebrium_toml
string

Verbatim contents of the cerebrium.toml configuration file.

compute
array

Compute type(s) for the app, in priority order. A single value or a list of up to 5. Valid values: ADA_L4, ADA_L40, AMPERE_A10, AMPERE_A100_40GB, AMPERE_A100_80GB, HOPPER_H100, HOPPER_H200, BLACKWELL_B200, BLACKWELL_RTX6000, CPU, INF2, TRN1, TURING_T4. Default: CPU.

computeTier
string

Compute tier for the app. Valid values: interruptible, protected.

containerRuntime
string

Container runtime version. Valid values: v1, v2.

cooldownPeriodSeconds
integer

Cooldown period in seconds before an idle replica scales down. Range: 0-3600. Default: 10.

cpu
number

Number of CPU cores to allocate. Range: 0.25-192. Default: 2.

deploymentInitializationTimeout
integer

Maximum time in seconds to wait for a deployment to initialize. Range: 60-830. Default: 600.

disableAuth
boolean

Disable authentication on the app endpoint. Default: false.

dockerAuth
string

Credentials for pulling the base image from a private Docker registry.

dockerfilePath
string

Path to a Dockerfile to build the app from.

entrypoint
array

Command to start a custom runtime app, as a list of strings.

evaluationIntervalSeconds
integer

Interval in seconds between autoscaling evaluations. Range: 6-300.

githubAutoDeploy
boolean

Automatically deploy new commits pushed to the configured branch.

githubBranch
string

Git branch to deploy. Default: main.

githubPath
string

Path within the repository containing the app.

gpuCount
integer

Number of GPUs to allocate. Range: 0-16. Default: 0.

healthcheckEndpoint
string

HTTP endpoint used to check that a custom runtime app is healthy.

loadBalancingAlgorithm
string

Load balancing algorithm. Valid values: round-robin, first-available, min-connections, random-choice-2.

logLevel
string

Log level for the deployment. Valid values: INFO, DEBUG, INTERNAL, ERROR. Default: INFO.

maxReplicaCount
integer

Maximum number of replicas. Range: 1-2000. Default: 1.

memory
number

Memory allocation in GB. Range: 0.05-1984. Default: 4.

minReplicaCount
integer

Minimum number of replicas. Range: 0-2000. Default: 0.

partialUpload
boolean

Whether the upload contains only files changed since the previous deployment.

port
integer

Port the app listens on. Range: 0-65535. Default: 8000.

provider
string

Cloud provider to deploy to. Valid values: aws, crusoe, nebius. Defaults to an automatically selected provider.

pythonVersion
string

Python version to use. Default: 3.10.

readycheckEndpoint
string

HTTP endpoint used to check that a custom runtime app is ready to receive traffic.

region
string

Region to deploy to. Defaults to an automatically selected region.

replicaConcurrency
integer

Maximum concurrent requests per replica. Defaults to 100 for CPU apps and 1 for GPU apps.

responseGracePeriodSeconds
integer

Grace period in seconds for in-flight requests when a replica stops. Range: 16-43200. Default: 900.

rollOutDurationSeconds
integer

Duration in seconds over which to roll out a new version. Range: 0-21600.

runtime
string

App runtime. Valid values: cortex, custom. Default: cortex.

scalingBuffer
integer

Number of extra replicas to keep available beyond current demand. Must be >= 0.

scalingMetric
string

Metric used for autoscaling. Valid values: cpu_utilization, memory_utilization, requests_per_second, concurrency_utilization. Default: concurrency_utilization.

scalingTarget
integer

Target value for the scaling metric. Must be > 0. Default: 100.

useUv
boolean

Use uv for Python package installation.

Response

Details of the created GitHub-linked app and its first build.

appId
string

Unique identifier of the created app.

appUrl
string

URL of the app in the dashboard.

buildId
string

ID of the build created for this deployment.

dashboardUrl
string

URL of the build in the dashboard.

internalEndpoint
string

Base URL for invoking the app.

jwt
string

Access token for streaming build logs.

logUrl
string

URL for retrieving build logs.

projectId
string

ID of the project the app belongs to.

status
string

Current status of the build.