Create service
Create a service from a Git repository or container image: a web service, background worker, private service, static site, scheduled cron job or function, chosen with runtimeMode (a cron job also takes a schedule). Creation does not deploy unless you pass deploy: true; otherwise call deploy_service with the new id to start the first deployment. Without a planKey, the service goes on the free plan when the account can have one and a free service can run in that project, otherwise on the cheapest paid plan of its type; planNote in the response says which plan it got and why.
Request & response examples
curl --fail-with-body --request POST \ 'https://app.helicarrier.xyz/api/services' \ -H "Authorization: Bearer $HELI_API_KEY" \ -H 'Content-Type: application/json' \ --data '{ "name": "my-app", "projectSlug": "my-project", "environmentSlug": "staging", "image": "nginx:stable", "internalPort": 80, "planKey": "heli-s1"}'const response = await fetch( "https://app.helicarrier.xyz/api/services", { method: "POST", headers: { Authorization: `Bearer ${process.env.HELI_API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ "name": "my-app", "projectSlug": "my-project", "environmentSlug": "staging", "image": "nginx:stable", "internalPort": 80, "planKey": "heli-s1" }) });const data = await response.json();if (!response.ok) { throw new Error(`HTTP ${response.status}: ${data.error}`);}// Inspect data; avoid logging secret responses.import osimport requests
response = requests.request( "POST", "https://app.helicarrier.xyz/api/services", headers={ "Authorization": f"Bearer {os.environ['HELI_API_KEY']}" }, json={ "name": "my-app", "projectSlug": "my-project", "environmentSlug": "staging", "image": "nginx:stable", "internalPort": 80, "planKey": "heli-s1" }, timeout=30,)response.raise_for_status()data = response.json()# Inspect data; avoid logging secret responses.{ "id": "svc_example", "name": "my-app", "slug": "my-app", "sourceType": "image", "status": "idle", "planKey": "heli-free", "projectId": "prj_example", "environmentId": "env_example", "nextStep": "Not deployed yet. Call deploy_service (POST /api/services/svc_example/deploy) to start the first deployment.", "planNote": "my-app is on the free plan (heli-free). It sleeps after 5 minutes without traffic, and the next request wakes it, which takes at least 30 seconds. The account's free services share 500 free hours a month: 498 are left until November 1, and it is using 1 of its 10 free services. To keep it always on, move it to a paid plan with set_plan."}Illustrative values · selected fields
Request body
namestringrequiredService name.
projectSlugstringoptionalTarget project slug. Set this explicitly for automation; project keys require their own project. An account key that omits it uses the default project, if one exists.
environmentSlugstringoptionalTarget environment slug (e.g. dev, staging, production). Optional for a normal key — the project's default environment is used. REQUIRED when your API key is restricted to specific environments; call whoami to see whether yours is.
repoUrlstringoptionalGit repo URL (for source builds).
branchstringoptionalGit branch to track and build (default main).
imagestringoptionalDocker image ref (for image services).
runtimeModestringoptionalweb | worker | private | static | cron | function (default web). Use worker for a background process that serves no HTTP (queue consumers, bots, schedulers that loop) and cron for a job that runs on a schedule.
schedulestringoptionalFive-field crontab expression, e.g. "*/15 * * * *". Required when runtimeMode is cron, refused otherwise. startCommand is the command each run executes.
internalPortintegeroptionalPort the app listens on (web/private/function; ignored for worker and cron).
rootDirstringoptionalGit: subdir the app lives in, e.g. apps/api. Empty for the repo root.
builderstringoptionalGit: "" auto | railpack | dockerfile | next.
dockerfilePathstringoptionalGit: path to a Dockerfile relative to the root dir.
installCommandstringoptionalGit: install command override.
buildCommandstringoptionalGit: build command override (for static, the command that produces outputDir).
startCommandstringoptionalFor cron (git or image): the command run on each tick. For a git service: the start command override, e.g. "node worker.js" for a worker. An image service otherwise runs the image's own CMD and refuses startCommand.
releaseCommandstringoptionalCommand run once before each release (migrations).
outputDirstringoptionalGit static sites only: the directory the build writes the site to (e.g. dist).
healthCheckPathstringoptionalHTTP path that must answer 2xx before a deploy goes live, e.g. /healthz (web services).
planKeystringoptionalPlan key from list_plans (e.g. heli-s1). If omitted: the free plan when the account can have one and a free service can run there, else the cheapest paid plan of the service type.
readonlyRootfsbooleanoptionalRead-only root filesystem; ON by default for new services. /tmp and /run stay writable but are noexec, so pass false for apps that download and run a binary at runtime (puppeteer/playwright Chromium, self-extracting tools) or write to their own files.
deploybooleanoptionaltrue to also queue the first deployment in the same call (default false: create only). If the deploy is refused the service is still created, and deployRefused and nextStep say why.
Response 201
Creation does not deploy unless deploy is true: otherwise call the deploy operation with the returned id to start the first deployment, which starts a billed resource. Choose a plan before creating the service; without one, the service goes on the free plan where a free service can run, otherwise on the cheapest paid plan of its type. Supply either a Git repository or a container image.
Examples show selected response fields with illustrative values. Your response can contain additional fields.
idstringUnique identifier of this resource.
namestringHuman-readable resource name.
slugstringURL-safe resource identifier.
sourceTypestringSource used to build or run the service.
statusstringCurrent state of the resource or operation.
planKeystringPlan identifier from the plan catalog.
projectIdstringProject that owns the resource.
environmentIdstringEnvironment that contains the service.
nextStepstringplanNotestringWhat the plan the new resource landed on means: on the free plan, how it sleeps and wakes and what the account has left; on a paid plan you did not name, why it is not free. Empty otherwise.
Errors
400Invalid parameters. Check the required fields, types, and resource configuration.
401The API key is missing, invalid, or revoked.
402The account must resolve a billing requirement before continuing.
403The caller or key scope does not permit this operation.
404The resource does not exist or is not visible to this caller.
create_service
Required MCP arguments: name, projectSlug. Send path, query, and body fields together as tool arguments.