<!-- tempo-docs-context -->
> Source: [/docs/cli/request](https://tempo.com/developers/docs/cli/request.md)
> Section: [Get Started](https://tempo.com/developers/get-started.md). Choose a starting point, send a test payment, get testnet funds, connect a coding agent, find the SDKs and CLI, and use the resource guides to plan payment workflows, liquidity, provider selection, and partner integrations.
> [Documentation index](https://tempo.com/developers/llms.txt) · [Docs skill](https://tempo.com/developers/SKILL.md)

> Tempo MCP: Use `search`, `find_pages`, `read_page`, and `code` at `https://mcp.tempo.xyz` for Tempo and related documentation.
> If an indexed page is missing or reflects an older site, read this site’s [documentation index](https://tempo.com/developers/llms.txt) and Markdown pages directly.

# `tempo request`

A curl-compatible HTTP client that handles [Machine Payments Protocol](https://mpp.dev/overview) negotiation transparently. When a server responds with [`402 Payment Required`](https://mpp.dev/protocol/http-402), `tempo request` reads the [challenge](https://mpp.dev/protocol/challenges), authorizes payment using the configured method, then retries with the [credential](https://mpp.dev/protocol/credentials) in one command.

For the wallet-backed flow, run [`tempo wallet login`](https://tempo.com/developers/docs/cli/wallet#sign-in) first. A `--dry-run` preview can read payment terms without logging in. Use [`tempo wallet services`](https://tempo.com/developers/docs/cli/wallet#discover-services) before calling paid endpoints so agents and scripts use registered URLs, methods, pricing, and request schemas instead of guessing.

<span id="tempo-request-usage" />

## Usage

```bash [Terminal]
tempo request [FLAGS] <URL>
```

```bash [Terminal]
tempo request --dry-run <URL>
tempo request --max-spend <AMOUNT> <URL>
tempo request -X POST --json '<BODY>' <URL>
tempo request -H '<HEADER>: <VALUE>' <URL>
```

<span id="tempo-request-examples" />

## Examples

Preview the cost before paying:

```bash [Terminal]
tempo request --dry-run -X POST \
  --json '{"prompt":"a sunset over the ocean"}' \
  https://fal.mpp.tempo.xyz/fal-ai/flux/dev
```

Make the paid request:

```bash [Terminal]
tempo request -X POST \
  --json '{"prompt":"a sunset over the ocean"}' \
  https://fal.mpp.tempo.xyz/fal-ai/flux/dev
```

<span id="tempo-request-flags" />

## Flags

| Flag | Description |
| --- | --- |
| `-X <METHOD>` | HTTP method, such as `GET` or `POST`. |
| `--json <BODY>` | Send a JSON body. Implies `-X POST`. |
| `-H <HEADER>` | Add a custom header. |
| `--dry-run` | Request payment terms without paying. |
| `--max-spend <AMOUNT>` | Set a hard cap on cumulative payment spend. |
| `-D, --dump-header <FILE>` | Write response headers to a file, useful for inspecting MPP challenges. |
| `-t, --toon-output` | Print compact, machine-readable output for scripts and agents. |

<span id="learn-more-about-paid-tempo-requests" />

## Related

[tempo wallet](https://tempo.com/developers/docs/cli/wallet): Sign in and discover services

[MPP protocol](https://mpp.dev/protocol): Challenges, credentials, and receipts

[MPP SDKs](https://mpp.dev/sdk): Choose a client or server SDK

[Accept payments](https://tempo.com/developers/docs/guide/machine-payments/server): Add MPP to your own API
