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

# TinyAgent Reference

> Technical reference for goal-based TinyFish automation

All endpoints across Agent, Runs, Browser Context Profiles, and Vault are documented
across the pages below. All requests require the `X-API-Key` header unless noted otherwise. See
[Authentication](https://docs.tinyfish.ai/authentication.md). For wallet balance and top-ups, see [Wallet](https://docs.tinyfish.ai/wallet.md).

Each page below covers one resource end to end — request/response schema, every field, every
error. Start with **Agent** if you're creating runs; jump to **Runs** once you have a `run_id` and
need to poll, cancel, or fetch screenshots; use **Browser Context Profiles** or **Vault** only if
your runs need saved login state or password-manager credentials.

> [card] [Agent](https://docs.tinyfish.ai/agent/api/agent)
>
> Run an agent synchronously, asynchronously, in a batch, or via SSE

> [card] [Runs](https://docs.tinyfish.ai/agent/api/runs.md)
>
> List, retrieve, and cancel runs; fetch step screenshots and HTML

> [card] [Browser Context Profiles](https://docs.tinyfish.ai/agent/api/profiles)
>
> Create, manage, and set up saved browser sessions

> [card] [Vault](https://docs.tinyfish.ai/agent/api/vault.md)
>
> Connect password managers and sync credentials

## Error Codes

Common HTTP-level errors across automation endpoints:

| Status | Code | Meaning |
| - | - | - |
| `400` | `INVALID_INPUT` | Invalid request body or missing required fields |
| `401` | `MISSING_API_KEY`, `INVALID_API_KEY` | Missing or invalid API key |
| `401` | `VAULT_RECONNECT_REQUIRED` | Reconnect the affected vault provider, then retry; see [error recovery](https://docs.tinyfish.ai/error-codes.md) |
| `403` | `FORBIDDEN` | Access denied |
| `429` | `RATE_LIMIT_EXCEEDED` | Rate limit exceeded |
| `500` | `INTERNAL_ERROR` | Internal server error |

The `COMPLETE` SSE event or `GET /v1/runs/{id}` may also include run-level failures such as `TASK_FAILED`, `SITE_BLOCKED`, `MAX_STEPS_EXCEEDED`, `TIMEOUT`, or `BILLING_REJECTED`.

## Related

> [card] [TinyAgent overview](https://docs.tinyfish.ai/agent.md)
>
> First request, endpoint selection, and goal-writing basics

> [card] [Structured Output](https://docs.tinyfish.ai/agent/api/agent/structured-output.md)
>
> Schema support, limits, and common rewrites

> [card] [Runs](https://docs.tinyfish.ai/agent/explanation/runs.md)
>
> Statuses, polling, and lifecycle behavior

> [card] [Goal prompting guide](https://docs.tinyfish.ai/prompting-guide.md)
>
> Improve automation reliability

> [card] [Authentication](https://docs.tinyfish.ai/authentication.md)
>
> API key setup and troubleshooting

> [card] [Vault Credentials](https://docs.tinyfish.ai/key-concepts/credentials.md)
>
> Use password manager credentials in runs

> [card] [Browser Context Profiles](https://docs.tinyfish.ai/key-concepts/browser-context-profiles.md)
>
> Reuse saved logged-in browser state


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