---
title: Quick reference
description: The calls your AI assistant makes for each common Turn Zero Cloud task, in order, and where to read the limits you meet most often.
slug: /getting-started/quick-reference
order: 11
visibility: public
redirects_from: []
---

# Quick reference

Find the calls for a common task in execution order. Read the linked guide for prerequisites, approval requirements, alternatives, and verification. The limits below link to their current values or to the API that returns them.

## Connect and deploy an app

1. [Connect your AI assistant](/cloud/getting-started/connect-your-tool/), sign in, then call `start`. For Claude Code or Codex CLI, the MCP address is `https://dev.turnzero.ai/mcp`.
2. Call `tzcloud_create_application` and keep the app ID. For a server, pass the chosen size. For a serverless app, pass `kind: "serverless"` and leave out the size. Call `tzcloud_submit_manifest` with that ID and the app’s manifest. If the person wants to test in development first, call `tzcloud_create_environment` for development before deploying.
3. On a [computer authorized for deploys](/cloud/getting-started/connect-your-tool/#authorize-this-computer-for-deploys), call `tzcloud_deploy_command` with the app ID. Run the command it returns from the app’s folder.
4. Call `tzcloud_read_status` for the deploy’s environment until the deploy finishes. Check the result and open the app at the returned address.
5. If the app has a development environment, test the version there. If the person asks to release it, call `tzcloud_promote` with the tested version and check production with `tzcloud_read_status`. For an app with only production, step 4 finishes the deployment.

See [Deploy from your computer](/cloud/getting-started/deploy-an-application/) for the full steps, or [Deploy from a chat](/cloud/getting-started/build-an-app-from-a-chat/) if you have no terminal.

## Common tasks

These are actions for your AI unless a row names a step for you. Follow the linked guide for any required approval. Use the [connection address for your AI](/cloud/getting-started/connect-your-tool/). The CLI connection provides Turn Zero Cloud, tzTrack and tzMesh. Chat tools connect to Cloud hosting separately from tzTrack and tzMesh. Your account’s access still applies.

| Task | Calls, in order | Guide |
| --- | --- | --- |
| Connect Claude Code | Run `claude mcp add --transport http --scope user turnzero https://dev.turnzero.ai/mcp`. Ask the person to start a new Claude Code session, use `/mcp` and sign in; the new session calls `start`. | [Connect your AI assistant](/cloud/getting-started/connect-your-tool/) |
| Set this computer up for deploys | Run `npx --no-update-notifier -y turnzero@next authorize --origin https://dev.turnzero.ai`, call `mint_token` with the printed members, then run its `command_npx` once on that computer (`npx.cmd` and `command_npx_windows` on Windows). If npx can't run here, use an installed command that answers `turnzero --version`, or follow the linked guide's other routes. | [Authorize this computer for deploys](/cloud/getting-started/connect-your-tool/#authorize-this-computer-for-deploys) |
| Install the turnzero command | Run `npm install -g turnzero@next`. Without the install, write `npx --no-update-notifier -y turnzero@next` in place of the command's name in each command (`npx.cmd` on Windows). | [Installation and npm](/cloud/concepts/turnzero-command/#installation-and-npm) |
| Start a new project from a template | `turnzero scaffold --origin https://dev.turnzero.ai`, with `--template <name>`. Choose `server-hello` (the default, no sign-in), `server-database`, or `server-scheduled-job`. For sign-in and private notes, choose `functions-sign-in` when the app can run as functions or `server-sign-in` when it needs a server. Choose `server-ai-chat` for sign-in and an AI conversation. Choose `static-site` for a static site with no server, or `functions-database` for a public notes page with a function and a database. | [Starting a new service](/cloud/concepts/turnzero-command/#starting-a-new-service) |
| Create and deploy an application | `tzcloud_create_application`, `tzcloud_submit_manifest`, `tzcloud_deploy_command`, then run the command it returns | [Deploy from your computer](/cloud/getting-started/deploy-an-application/) |
| Deploy from a chat or a workspace without a working deploy command | Call `tzcloud_deploy_files` with file contents, stored file references, or retained hashes. Follow the returned `tzcloud_read_status` call if the deploy is still running. | [Deploy from a chat](/cloud/getting-started/build-an-app-from-a-chat/). [File upload details](/cloud/getting-started/deploy-an-application/#deploying-from-a-chat-whose-shell-cannot-reach-the-platform) |
| Turn on a development environment | `tzcloud_create_environment` for development, then `tzcloud_deploy_command` and run the command it returns | [Turn the development environment on](/cloud/guides/turn-on-development-and-promote/#turn-the-development-environment-on) |
| Promote a tested version to production | `tzcloud_read_status` for development, then `tzcloud_promote` with a wait | [Promote to production](/cloud/guides/turn-on-development-and-promote/#promote-to-production) |
| Roll back production | `tzcloud_list_versions`, then `tzcloud_roll_back` with a wait | [Roll back](/cloud/guides/manage-versions-and-environments/#roll-back) |
| Store an outside API's key | `tzcloud_store_secret`, run the command it returns, then `tzcloud_declare_outbound_api` | [Store an API key](/cloud/getting-started/store-a-secret/#store-an-api-key-and-call-through-the-gateway) |
| Replace a secret your code reads | Call `tzcloud_store_secret` with `replace: true` and run its value command if returned. If the serving copy already uses the binding, follow the restart call when one is returned and check `tzcloud_read_status`. To apply a new binding, deploy or promote the version that uses it. | [Replace a value](/cloud/getting-started/store-a-secret/#3-replace-a-value) |
| Add a database | `tzcloud_submit_manifest` with the database service, then `tzcloud_deploy_command` and run the command it returns | [Add a database](/cloud/guides/add-a-database/) |
| Restore, export, or inspect development PostgreSQL data | For example, open psql with `turnzero db connect --environment development -- psql --no-psqlrc`. Use the file from `turnzero provision --origin https://dev.turnzero.ai`. | [Connect to your database](/cloud/guides/connect-to-your-database/#2-run-one-postgresql-tool) |
| Restore, export, or inspect production PostgreSQL data | Call `tzcloud_open_database_connection` and approve in the browser. For example, open psql with `turnzero db connect --grant PENDING_ACTION_ID -- psql --no-psqlrc`, replacing `PENDING_ACTION_ID` with the pending action ID. | [Connect to your database](/cloud/guides/connect-to-your-database/) |
| Start a key-value service | `turnzero scaffold --origin https://dev.turnzero.ai --template server-database --resource entries --singular entry --fields "key:text,value:text"` | [Keep key-value records](/cloud/getting-started/build-a-database-backed-service/#keep-key-value-records) |
| Add a scheduled job | `read_context` for `skill:schedule`, `tzcloud_read_plan_quotas` for the schedule limits, `tzcloud_submit_manifest` with a schedule, `tzcloud_deploy_command` and run the command it returns, `tzcloud_run_schedule`, then `tzcloud_read_schedules` | [Add a scheduled job](/cloud/guides/add-a-scheduled-job/) |
| Call an AI model | `tzcloud_read_library` with `contains` to find the AI Generation entry, then with `entry` set to its name. Take the package, call `generateText` from a route, then call `tzcloud_submit_manifest` and `tzcloud_deploy_command` and run the command it returns. | [Call an AI model](/cloud/guides/call-an-ai-model/) |
| Generate an image | `tzcloud_read_library` with `contains` to find the AI Generation entry, then with `entry` set to its name. Take the package, send a `generateContent` request from a route, then call `tzcloud_submit_manifest` and `tzcloud_deploy_command` and run the command it returns. | [Generate an image with AI](/cloud/guides/generate-an-image-with-ai/) |
| Generate one image from your AI assistant | On `https://dev.turnzero.ai/mcp`, call `generate_image` with a prompt, then open its `link` or run its download command. No application is needed. `renew_image_link` gives a fresh link while the account still keeps the picture. | [Generate an image with your AI assistant](/cloud/guides/generate-an-image-from-your-ai-tool/) |
| Add sign-in | `tzcloud_submit_manifest` with the accounts service, a link to `/__account/signin`, then `tzcloud_deploy_command` and run the command it returns | [Add sign-in to your app](/cloud/guides/add-sign-in-to-your-app/) |
| Attach your own domain | `tzcloud_submit_manifest` with the domain, add the CNAME record at your DNS provider, `tzcloud_read_status` for the TXT record and add it there, then `tzcloud_read_status` until the domain is live | [Attach your own domain](/cloud/guides/attach-your-own-domain/) |
| Find recent errors | `tzcloud_read_status`, then `tzcloud_read_logs` at the error level | [Find the last hour's errors](/cloud/guides/read-logs-and-counters/#1-find-the-last-hour-s-errors) |
| Read usage or change a server's size | Read usage with `tzcloud_read_usage`. To change a server's size, read `tzcloud_read_plan_quotas`, call `tzcloud_set_app_size`, then use `tzcloud_read_status` for any returned redeploy version. After a size change, restart each running database environment that was not re-created to load the new connection setting. A sleep-only change needs no restart to load database settings. | [Size and usage](/cloud/guides/plan-and-usage/) |

### Other management actions

- `tzcloud_set_app_size` changes a server application's size or sleep setting. If the tool returns `applying`, use `tzcloud_read_status` with `wait_seconds` to see when the change finishes and which size is in effect.
- `tzcloud_set_log_retention` turns the paid monthly option on or off. Turning it off deletes entries past standard retention at the next retention run; they cannot be restored.
- `tztrack_set_ai_passes` turns the paid monthly option on or off for a space.

If `tzcloud_set_log_retention` or `tztrack_set_ai_passes` returns `option_not_set`, the option stayed off. The day’s charge was posted or had already been recorded. Retrying for the same item that UTC day does not charge it again.

- `read_balance` reads your account's balance, threshold, warning record, pause state and current UTC month's usage lines. The response's `model` is `usage`.

## Minimal manifest

For a server, save the declarations below in `manifest.json`. Submit the whole document with `tzcloud_submit_manifest` before deploying. The manifest declares what the app needs; it does not contain the app's source code. For a site of static files alone, use the manifest in [Publish a static site](/cloud/guides/publish-a-static-site/), with no health path.

```json
{
  "manifest_version": 1,
  "services": [],
  "health": "/health",
  "region": "usa",
  "egress": [],
  "audience": { "kind": "public" },
  "packages": []
}
```

This example declares no optional service, external host or library package. Its server must answer `/health` with HTTP 200. To add a database, put `{ "kind": "database" }` in `services`. [The manifest](/cloud/concepts/the-manifest/) lists every field and links the current schema.

## Environment variables

The platform supplies these values to a deployed app. Read them from `process.env`; keep credentials out of source files and logs.

| Variable | What your code uses it for |
| --- | --- |
| `PORT` | Listen on this port, currently `8080`. |
| `APP_PUBLIC_HOST` | Build public URLs with `https://` followed by this hostname. |
| `APP_ENVIRONMENT`, `APP_VERSION` | Identify the environment and running version. |
| `APP_DATABASE_URL` | Connect the request pool to the database. This value contains a password. |
| `APP_DATABASE_DIRECT_URL` | Connect work that needs one server session directly to the database. This value contains a password. |
| `APP_DATABASE_CONNECTION_LIMIT` | Set the database pool's maximum connections per process. |
| `TURNZERO_CLOUD_API`, `TURNZERO_CLOUD_APPLICATION` | Find the platform's origin and this app's identifier. |
| `TURNZERO_CLOUD_APP_TOKEN` | Authenticate the app's storage, egress and logging calls. Keep it secret. |

[Runtime settings](/cloud/concepts/the-settings-a-deployed-copy-receives/) lists the conditional settings too. Add settings of your own through the manifest's `settings` member: `{ "SITE_TITLE": { "value": "My app" } }` for a plain value, or `{ "API_KEY": { "secret": "stored-key-name" } }` for a stored secret.

## Application limits

[Size limits](/cloud/guides/plan-and-usage/#size-limits) explains which live applications count toward the account limit. Choose Shared 0.5 GB or Shared 1 GB for each server's production copy. A site of static files alone needs no size; follow [Publish a static site](/cloud/guides/publish-a-static-site/). Production sleeps when idle if its sleep setting is on; development always sleeps when idle. Email and custom domains are available to every application. Usage draws the account's balance at the [pricing page's](https://dev.turnzero.ai/pricing) rates.

## Key limits

Each line says what a limit bounds and links the section that states its figure or says where to read it. Limits and rates can change without a release. Read limits through `tzcloud_read_plan_quotas` by size, and rates on the [pricing page](https://dev.turnzero.ai/pricing) or through `read_rate_card`.

- How long one request to your app may run: [The execution window](/cloud/concepts/egress-firewall-and-request-limits/#the-execution-window).
- How long one scheduled run may run: [Schedule](/cloud/backend-packages/schedule/#use-it-when).
- The largest request body your app receives: [The request size limit](/cloud/concepts/egress-firewall-and-request-limits/#the-request-size-limit).
- The largest file one storage write takes: [Limits and metering](/cloud/guides/store-files/#4-limits-and-metering), in Store files.
- How many requests one address or one signed-in user may send your app a minute: [The per-address and per-user limits](/cloud/concepts/egress-firewall-and-request-limits/#the-per-address-and-per-user-limits).
- How many calls a minute the platform accepts from one address, and from one credential on the storage routes: [The platform request limit](/cloud/concepts/egress-firewall-and-request-limits/#the-platform-request-limit).
- How much outbound traffic your app may send: [Outbound limits](/cloud/concepts/egress-firewall-and-request-limits/#outbound-limits).
- How many database connections each process may hold: [The connection limit](/cloud/guides/add-a-database/#the-connection-limit).
- The largest deploy zip, and how many files it may hold: [Names and limits](/cloud/concepts/what-the-deploy-zip-holds/#names-and-limits).
- How large a deploy through `tzcloud_deploy_files` may be: [Check and deploy the files](/cloud/getting-started/build-an-app-from-a-chat/#4-check-and-deploy-the-files).
- How many web client files a version may serve, and how large: [Keep names and sizes within the limits](/cloud/guides/serve-a-web-client/#3-keep-names-and-sizes-within-the-limits).
- How long a WebSocket connection may stay open: [Limits and metering](/cloud/guides/use-websockets/#limits-and-metering), in Use WebSockets.
- How many log bytes each environment keeps: [Stay under the retained-bytes limit](/cloud/guides/read-logs-and-counters/#9-stay-under-the-retained-bytes-limit).
- The size's limits: [Size limits](/cloud/guides/plan-and-usage/#size-limits).

## Related

- [Find the guide for a task](/cloud/getting-started/find-a-guide/) links the guide for every task, including the ones above.
- [Sign-in, sessions, and tokens](/cloud/concepts/sign-in-sessions-and-tokens/) compares every credential: who uses it, what it may do, how long it lasts, and what ends it.
- [The turnzero command's credential](/cloud/concepts/how-the-turnzero-command-finds-its-credential/) says which credential each command of the turnzero command runs under, including `turnzero provision --origin https://dev.turnzero.ai`.
- [Refusals](/cloud/reference/refusals/) gives each refusal's cause and remedy.
- [Glossary](/cloud/concepts/glossary/) defines the terms these guides use.
