Skip to navigation

Projects

A project is a named group inside your account. It does three things:

  • It holds routing defaults for every request made with its keys.
  • It owns sandboxes and images. A key sees only the sandboxes and images of its own project.
  • It holds the webhook URL and webhook secret for sandbox events.

Your account starts with one project. Next step: create a project for each workload that needs its own routing or its own set of sandboxes.

All project routes need a key with the admin scope. An admin key can manage every project in the account, whichever project the key itself belongs to.

Create a project

curl -sS -X POST "$MEADOW_BASE_URL/v1/projects" \
-H "Authorization: Bearer $MEADOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "evals",
"webhook_url": "https://example.com/hooks/meadow",
"routing": {
"models": {
"order": ["google", "openrouter"],
"per_model": {"grok-4.7": {"only": ["xai"]}}
},
"sandboxes": {"order": ["modal", "daytona"], "create_timeout_seconds": 120}
}
}'
{
"created_at": "2026-11-24T20:39:52.602Z",
"id": "prj_0000c2ce",
"name": "evals",
"routing": {
"models": {"order": ["google", "openrouter"], "per_model": {"grok-4.7": {"only": ["xai"]}}},
"sandboxes": {"create_timeout_seconds": 120, "order": ["modal", "daytona"]}
},
"webhook_secret": "whsec_...",
"webhook_url": "https://example.com/hooks/meadow"
}

Only name is required. webhook_secret is returned on create and after a rotation, and never on a read. Store it when you see it.

max_sandboxes caps how many sandboxes of the project may be alive at once, whichever key made them. Left out, there is no cap. See Sandboxes.

The project samples on this page were captured before 2026-11-28. A project object now also carries max_sandboxes, null when not set. That is read from the server’s code: no new sample was captured.

Send an Idempotency-Key header with POST /v1/projects so a retry cannot create a second project. A retry by the same API key with the same Idempotency-Key and body within 24 hours returns the first response with Idempotent-Replayed: true and without webhook_secret: Meadow never saves a one-time secret. If you lost the first response, rotate the secret (see Webhooks). Two projects may share a name.

A new project has no keys. Create one with POST /v1/keys and the new project_id. See Authentication.

Routing defaults for models

routing.models says which providers may serve a model call and in what order.

FieldMeaning
orderProviders to try first, in this order. Providers not listed are tried after them.
onlyUse only these providers.
ignoreNever use these providers.
allow_fallbacksfalse means try one provider and stop. Default true.
per_modelThe same four fields for one model ID.

In every case Meadow skips providers you have no provider key for and providers that do not accept the request’s format. A request can override these fields for one call, and a per_model entry overrides them for one model. Routing and fallbacks gives the default route, the order in which the layers apply, and what triggers a fallback.

This project puts OpenRouter first:

curl -sS -X PATCH "$MEADOW_BASE_URL/v1/projects/$PROJECT_ID" \
-H "Authorization: Bearer $MEADOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"routing": {"models": {"order": ["openrouter", "google"]}}}'

A call with one of the project’s keys follows that order. Read the response headers to see who served it:

curl -sS -D - -o /dev/null "$MEADOW_BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer $PROJECT_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gemini-3.1-flash-lite-preview", "messages": [{"role": "user", "content": "Say hi in one word."}], "max_tokens": 16}' \
| grep -i x-meadow
x-meadow-attempts: 2
x-meadow-model: gemini-3.1-flash-lite-preview
x-meadow-provider: google

Two attempts: in this run the OpenRouter account did not allow that model, so Meadow fell back to Google. A request can override the project for one call:

curl -sS -D - -o /dev/null "$MEADOW_BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer $PROJECT_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gemini-3.1-flash-lite-preview", "provider": {"only": ["google"]}, "messages": [{"role": "user", "content": "Say hi in one word."}], "max_tokens": 16}' \
| grep -i x-meadow
x-meadow-attempts: 1
x-meadow-model: gemini-3.1-flash-lite-preview
x-meadow-provider: google

Routing defaults for sandboxes

routing.sandboxes does the same for sandbox creates.

FieldMeaning
orderdaytona and modal in the order to try. Default: Daytona, then Modal.
onlyUse only these providers.
allow_fallbacksfalse means try one provider and stop. Default true.
create_timeout_secondsHow long to wait on one provider before trying the next, from 1 to 3600. When neither the project nor the request sets it: 300 on the last provider in the route and 120 on an earlier one. A GPU sandbox waits 300 on each: see Sandboxes.
optionsProvider settings keyed by provider, such as {"daytona": {"spot": true}}. Only a fixed set of keys is accepted.

A request’s provider object overrides these field by field. A project cannot set a default sandbox lifetime: timeout_seconds is set on each create.

Lock a project

"lock": true inside routing stops requests from overriding the project. Use it when a project must stay on approved providers.

curl -sS -X PATCH "$MEADOW_BASE_URL/v1/projects/$PROJECT_ID" \
-H "Authorization: Bearer $MEADOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"routing": {
"models": {
"order": ["google", "openrouter"],
"allow_fallbacks": false,
"per_model": {"grok-4.7": {"only": ["xai"]}}
},
"lock": true
}
}'

On a locked project:

  • A model request that sends a provider object gets a 403.
  • A model ID pinned as <provider>/<model> gets a 403.
  • A sandbox create that sends any routing field in provider, including options, gets a 403.
  • GET /v1/models lists only the providers the project’s routing allows.
  • Requests with no routing fields work, and follow the project’s defaults and per_model entries.
curl -sS "$MEADOW_BASE_URL/v1/chat/completions" \
-H "Authorization: Bearer $PROJECT_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gemini-3.1-flash-lite-preview", "provider": {"only": ["openrouter"]}, "messages": [{"role": "user", "content": "Say hi in one word."}], "max_tokens": 16}'
{"error":{"message":"project routing is locked and cannot be overridden","type":"invalid_request_error","param":null,"code":"forbidden"},"request_id":"req_0000a49f"}
MessageCause
project routing is locked and cannot be overriddenA model request sent provider.
project routing is locked and provider-pinned models are not allowedA model request used <provider>/<model>.
project routing is lockedA sandbox create sent routing fields.
project routing allows no providers for this modelThe locked routing leaves no provider for the model.

A lock is a rule on requests. An admin key can still change or remove it with PATCH.

Update a project

PATCH /v1/projects/{project_id} changes name, webhook_url, max_sandboxes, and routing. Fields you leave out stay as they are.

routing is replaced as a whole. A patch that sends routing with one field drops every other routing field:

curl -sS -X PATCH "$MEADOW_BASE_URL/v1/projects/$PROJECT_ID" \
-H "Authorization: Bearer $MEADOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"routing": {"lock": true}}'
{"created_at":"2026-11-24T20:39:52.602Z","id":"prj_0000c2ce","name":"evals","routing":{"lock":true},"webhook_url":"https://example.com/hooks/meadow"}

The models.order this project had before the patch is gone. To change one routing field, read the project, edit the routing object, and send all of it.

Set "webhook_url": null to remove the webhook URL. A webhook URL must use https and resolve to a public address.

Bad input returns 400 with a message that names the field. error.param carries the field too. For an unsupported provider option it names the key, such as routing.sandboxes.options.daytona.<key> with error.code parameter_unknown (seen on the hosted beta on 2026-11-28):

MessageCause
invalid model provider in routing.models.orderA sandbox provider or an unknown name in a model list.
routing.sandboxes.create_timeout_seconds must be at most 3600Value out of range.
unknown field in routingA misspelled or unsupported field. Unknown fields are never ignored.
unsupported key in routing.sandboxes.options.daytonaAn option Meadow does not accept for that provider.
webhook_url must use httpsA plain http URL.
name must not be emptyBlank name.

Rotate the webhook secret

Send {"rotate_webhook_secret": true}. The response carries the new webhook_secret once, and the old secret stays valid for 24 hours. Webhooks shows the call and how a receiver handles both secrets.

Read projects

curl -sS "$MEADOW_BASE_URL/v1/projects/$PROJECT_ID" \
-H "Authorization: Bearer $MEADOW_API_KEY"
{
"created_at": "2026-11-24T20:39:52.602Z",
"id": "prj_0000c2ce",
"name": "evals",
"routing": {
"models": {"order": ["google", "openrouter"], "per_model": {"grok-4.7": {"only": ["xai"]}}},
"sandboxes": {"create_timeout_seconds": 120, "order": ["modal", "daytona"]}
},
"webhook_url": "https://example.com/hooks/meadow"
}

GET /v1/projects returns every project in the account under data, oldest first, with "object": "list" and "has_more": false. It is not paginated.

Delete a project

curl -sS -o /dev/null -w '%{http_code}\n' -X DELETE "$MEADOW_BASE_URL/v1/projects/$PROJECT_ID" \
-H "Authorization: Bearer $MEADOW_API_KEY"
204

Deleting a project deletes every key in it. Those keys stop working at once. It cannot be undone.

Meadow rejects the delete with a 409 while any of these holds. A rejected delete removes nothing.

MessageWhat to do
project has sandboxes that are not terminated; delete them firstDelete each sandbox and wait for terminated.
project has sandboxes still being cleaned up at the provider; retry shortlyWait and retry. A create the provider did not clearly reject can hold this for as long as the sandbox’s own lifetime. See Known limits.
project has images; delete them firstDelete each image.
project has image builds still being cleaned up at the provider; retry shortlyWait and retry.
project has build contexts that have not expired; they expire on their own, retry laterA build context expires 24 hours after its last use. Retry after that.
project has expired build contexts still being removed; retry shortlyWait and retry.
deleting this project would delete the account's last admin key; mint an admin key in another project firstCreate an admin key in a project you are keeping.
N live keys in other projects count against a key with a limit in this project; revoke them firstA limited key here created keys in another project. Revoke those keys.

The last case, from a real run:

{"error":{"code":"project_has_dependent_keys","message":"1 live keys in other projects count against a key with a limit in this project; revoke them first","type":"conflict"},"request_id":"req_00005d96"}

A 409 uses the error type conflict. See Errors.

Restricted projects

A restricted project is for some of the people in the account. Owners and admins see every project. A member or viewer sees an unrestricted project, and a restricted project only after an owner or admin adds them to it. Keys do not change: a key works in its own project whoever can see it.

Restrict a project, then add a person by their user id from GET /v1/members:

curl -sS -X PATCH "$MEADOW_BASE_URL/v1/projects/$PROJECT_ID" \
-H "Authorization: Bearer $MEADOW_API_KEY" -H "Content-Type: application/json" \
-d '{"restricted": true}'
curl -sS -X PUT "$MEADOW_BASE_URL/v1/projects/$PROJECT_ID/members/$USER_ID" \
-H "Authorization: Bearer $MEADOW_API_KEY"
{"added_at":"2026-11-28T10:00:00Z","email":"grace@example.com","user_id":"00000000-0000-0000-0000-00000000f32d"}

To a person who cannot see it, a restricted project answers like a project of another account: 404 project_not_found on its id and in x-meadow-project. Its keys, sandboxes, images, usage records and requests are left out of every list and total, and so are provider keys that serve only hidden projects. The change applies from their next request. Removing a person from the account removes them from every project.

These calls need the admin scope, or an owner or admin session. GET /v1/projects/{project_id}/members lists who was added. DELETE /v1/projects/{project_id}/members/{user_id} removes a person, and returns 404 member_not_found when they were not added. See Known limits for what a restricted project does not hide yet.

API reference

Operations on this page: createProject, listProjects, getProject, updateProject, deleteProject, listProjectMembers, addProjectMember, removeProjectMember.