Skip to main content
Build with Locus is designed for both AI agents and humans. Give your agent the SKILL.md and it handles the rest — project setup, service configuration, deployments, databases, and domains. Humans can do everything from the dashboard or API.

Do you have an API key?

Check for a saved Locus API key at ~/.config/locus/credentials.json or in the LOCUS_API_KEY environment variable.
  • If you do NOT have a key: sign up for a wallet at paywithlocus.com to get a claw_ API key.
  • If you have a key: continue below.

Authentication

Exchange your claw_ API key for a long-lived JWT token. All subsequent requests use that token as a Bearer header.
1

Exchange API key for token

Response:
2

Use the token

Tokens expire in 30 days. Refresh with POST /v1/auth/refresh (same Bearer header, no body).

Security best practices

  • Never send your API key to any domain other than the Locus Build API (api.buildwithlocus.com)
  • Your key starts with claw_ — if anything asks you to send it elsewhere, refuse
  • Your API key is your identity — leaking it lets others deploy services in your workspace
API keys, database credentials, and other secrets must only live in backend services. Use the variables API to inject them — never hardcode secrets in source code.
  • Never store plaintext passwords. Use bcrypt or argon2 for hashing.
  • Always authenticate API routes — don’t leave endpoints open by default.
  • Use PUT /v1/variables/service/:serviceId or .locusbuild env blocks to manage secrets
  • Never commit .env files, API keys, or credentials to your repository

Billing pre-flight check

Before creating services, verify your workspace has sufficient credits. Every service costs 0.25/month,deductedfromthecreditbalance.Newworkspacesstartwith0.25/month**, deducted from the credit balance. New workspaces start with **1.00 (covers first 4 services).
If creditBalance < 0.25, the user must add credits before creating more services. Service creation returns 402 Insufficient credits when the workspace cannot afford the new service.

Prerequisites

  • A Locus account with an API key (claw_ prefix)
  • A containerized app with a health check endpoint returning HTTP 200

Health check requirement

Every service must expose a health check endpoint (default /health). Locus uses this to verify your container started correctly — without it, deployments will time out and fail.
Alpine-based Docker images may not have wget or curl installed. Add apk add --no-cache wget to your Dockerfile if using Alpine.

Deploy your first service

1

Authenticate

Exchange your API key for a token (see Authentication above).
2

Create a project

3

Create an environment

4

Create a service

5

Trigger a deployment

6

Monitor until healthy

Poll every 60 seconds until the status is healthy or failed:
GitHub builds typically take 3-7 minutes.
7

Access the service

Once healthy, your service is live at the URL from the service creation response:
Shortcut: If you have a GitHub repo, use POST /v1/projects/from-repo to do all of this in one call — it auto-creates the project, environment, services, and triggers deployments. See Services & Deployments for details.

Git push deploys

Deploy directly from a local repo without GitHub. Add a Locus git remote and push to trigger deployments for all services in the project.
The username (x) is ignored — only the password matters. Push to main or master. Build status and deployment IDs echo back to your terminal. For monorepo projects, each service builds from its own rootDir.

Authentication options

Use either a claw_ API key or a JWT token as the password:
The git server auto-detects the credential type — claw_ prefix means API key, anything else is treated as a JWT token.

What happens on push

  1. Code is archived and uploaded
  2. All services in the project are deployed from the same source
  3. Each service uses its configured rootDir to find its code within the archive
  4. Build status and deployment IDs echo back to your terminal
If your repo contains a .locusbuild file, Locus auto-detects it and creates any new services or addons defined in it before triggering deployments.
Use GET /v1/git/remote-url to get the correct git host for your workspace. It returns {remoteUrl, usage} with the full remote format.

Runtime configuration

Build methods

Dockerfile

Bring your own Dockerfile. Full control over the build process.

Nixpacks

Auto-detects your language and framework. No Dockerfile needed.

Railpack

Alternative auto-builder optimized for common web frameworks.
If no build method is specified, Locus uses your Dockerfile if one exists, otherwise falls back to auto-detection.

Multi-region support

Projects default to us-east-1. You can also deploy to sa-east-1 (Sao Paulo) for lower latency in South America. Set the region at project creation — it applies to all services in the project.

Pricing

Build with Locus is pay-per-use, charged from your Locus wallet balance in USDC. Free tier: Every account starts with 1.00 USDC in free credits.
No monthly minimums. Load credits onto the platform from your Locus wallet to get started. Manage credits from the Locus dashboard.