> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fastino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use https://docs.fastino.ai/llms.txt to discover and navigate pages. Use https://docs.fastino.ai/llms-full.txt when you need the complete documentation corpus. Use https://docs.fastino.ai/openapi.json as the source of truth for customer-facing routes. For GLiDE decision inference, call POST https://api.fastino.ai/v1/systemone with model fastino/GLiDE. Start managed training (config job) with POST /v1/training/jobs using base_model. For interactive training, native JSON clients use the public operations under /v1/training/jobs and /v1/training/usage. Existing Tinker clients use tinker==0.32.0 with TINKER_BASE_URL=https://api.fastino.ai/v1/training/compat/tinker and TINKER_CREDENTIAL_CMD. Compatibility child routes are private and absent from OpenAPI. Auto Train is private access and has no public route; direct interested users to sales@fastino.ai. Do not infer undocumented routes. Read API keys from FASTINO_API_KEY and never embed credentials in code, logs, or reports.

# Use it in CI

> Script runs in CI with an API key, JSON output and exit codes.

The CLI never prompts in CI, without a terminal, or under a coding agent. `--non-interactive` turns prompts off anywhere.

Set `FASTINO_API_KEY` from your CI's secret store. The CLI uses it when no login is saved. Don't pass the key on the command line, where shell history and other processes can see it.

This script starts a run, approves its plan, and waits for the result. `PROJECT_ID` holds a project ID from `fastino project list`. `BUILD_ID` holds your CI's build ID, which stays the same when a step is retried, such as `GITHUB_RUN_ID` on GitHub Actions.

```bash theme={null}
run=$(fastino run start --project "$PROJECT_ID" \
  --goal "Classify support tickets as billing, technical or account" \
  --dataset "support-tickets" \
  --benchmark "Macro F1 of 0.85 on held-out tickets" \
  --budget 25 \
  --idempotency-key "tickets-$BUILD_ID" \
  --json | jq -r '.run_id')

# Exits 3 when the run waits on you
fastino run wait "$run" || [ $? -eq 3 ]

# Approve only a plan that is waiting, so a retried step skips this
revision=$(fastino run status "$run" --json | jq -r '.plan.revision_hash // empty')
if [ -n "$revision" ]; then
  fastino run status "$run" --plan
  fastino run approve "$run" --revision "$revision" --ceiling 25
fi

# Exits 0 when the run meets its bar, 4 when it does not
fastino run wait "$run"
```

`--dataset`, `--benchmark` and `--budget` answer the agent's three questions up front, so the plan is usually the first thing the run waits on. With `--idempotency-key`, a retried step gets the same run back instead of starting a second one. The script approves only when a plan is waiting, so a retry after the approval goes straight to the last `run wait`. A key reused for a different start is refused.

`--revision` approves only the plan you read. A ceiling below the plan's estimate is refused unless you add `--acknowledge-underfunded`. Plans that need a spend cap refuse an approve without `--ceiling`. A run that pauses at its cap continues after `fastino run raise-cap <run> <usd>`.

If you leave out `--dataset`, `--benchmark` or `--budget`, the agent may ask that question first. `run wait` also exits 3 then, and `fastino run status <run>` shows the question. Answer it with `fastino run answer <run> "<choice>"`, adding `--amount <usd>` for the budget question, and wait again.

## What `--json` prints

* stdout carries only JSON. Spinners, progress and notices go to stderr, so you can pipe stdout into `jq` or save it to a file.
* Most commands print one JSON document. Commands that follow something over time, such as `job watch` and `job logs --follow`, print one JSON object per line as they go.
* When a command fails, stdout ends with an `error` object. It holds a `code`, a `message`, `retryable`, `userActionRequired`, and `next` steps to try.

## Exit codes

| Code | Meaning |
| - | - |
| `0` | Done |
| `1` | An error, or the request was refused |
| `2` | Bad usage, such as a missing flag |
| `3` | Waiting on a person, such as a run that needs you to answer a question or approve its plan |
| `4` | The run finished below its success bar |

## Page through training jobs

`fastino job list` returns up to 200 jobs per page, newest first. `--limit` sets the page size, from 1 to 200, and `--offset` skips jobs. Each page has `count`, `total` and `has_more`, so raise `--offset` by the page size while `has_more` is `true`:

```bash theme={null}
fastino job list --limit 50 --offset 50 --json | jq '{count, total, has_more}'
```

## Confirm with `--yes`

`run cancel`, `team role`, `billing limit` and `buy credits` ask you to confirm. Where the CLI can't prompt, such as in CI, they stop with exit code `2` unless you add `--yes`.

## Buy credits

```bash theme={null}
fastino buy credits 50 --yes --attempt-id "credits-$BUILD_ID"
```

`--attempt-id` makes a retried step reuse the same purchase, so the card is never charged twice. It takes up to 64 letters, digits, `-` or `_`. `fastino buy credits <usd> --dry-run` shows the charge and the card without buying. `--clear-pending` forgets an unconfirmed purchase, so the next one starts a new attempt.

When the team has no saved card, or the bank asks to confirm the payment, the command prints a Stripe Checkout link and exits 3. Buying credits needs the `owner`, `admin` or `billing` role.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.