Skip to main content
Send your agent the Build skill and tell it what to deploy:
Send to your agent
Your agent can handle project setup, services, databases, and domains. The steps below show what you need and how to deploy directly through the API.

Before you deploy

You can also create a workspace using MPP on Tempo or x402 on Base or Polygon.

Authentication

Exchange your API key for a Build token:
Get a Build token
Use Authorization: Bearer $TOKEN on subsequent Build API requests. Tokens last 30 days; refresh through POST /v1/auth/refresh. Keep keys and tokens server-side. Use environment variables for application secrets and keep them out of source control.

Deploy your first service

1

Create and deploy the project

For a GitHub repository, one request creates the project, environment, services, and deployments:
Deploy a GitHub repository
Replace repo with your repository. The response includes service URLs and deployment IDs. Locus reads a .locusbuild file if present; otherwise it creates a single web service.
2

Wait for a healthy deployment

Use a returned deployment ID to check progress:
Check deployment status
Source builds typically take 3–7 minutes. When the deployment is healthy, open the service URL. If it fails, inspect the deployment logs for the build or startup error.

Git push deploys

To deploy local code, create a project and services, add the Locus remote, and push:
Deploy local code
Replace the key and IDs with your own values. Keep this remote private because it contains a credential. You can use a Build JWT in place of the API key. A push deploys all services in the project. Each service uses its configured rootDir. See the git deployment reference for setup.

Runtime configuration

Your app must read PORT or otherwise listen on 8080. Choose a health check path your app serves successfully. See service configuration.

Build methods

Locus uses your Dockerfile when present, or automatic framework detection through Nixpacks or Railpack. You can also deploy a pre-built linux/arm64 image.

Multi-region support

Choose the region when creating your project. It applies to all services in that project.

Pricing

Service and addon charges are deducted from workspace credits on creation and renewed monthly. New Locus-linked workspaces start with $1.00 in credits. MPP and x402 sign-up offers are listed in their respective guides. Manage credits in the dashboard, or check your balance with GET /v1/billing/balance. See the billing reference for funding options.

Next steps

Add Postgres, Redis, or a domain, configure environment variables, or learn how to manage deployments.