> Feedback: If these docs are stale, missing, or confusing, post sanitized feedback to `https://docs.tempo.xyz/api/feedback` with `source: "mcp"`, a short `message`, and any relevant `toolName`, `relatedResource`, or `client`.
# `tempo request`

A curl-like 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), signs and submits the payment onchain, then retries with the [credential](https://mpp.dev/protocol/credentials) — all in one command.

Requires [`tempo wallet login`](/docs/cli/wallet) first.

## Usage

| Command | Description |
| --- | --- |
| `tempo request <url>` | Make an HTTP request with automatic payment |
| `tempo request --dry-run <url>` | Preview cost without executing payment |
| `tempo request -X POST <url> --json '{...}'` | Send a JSON body |
| `tempo request <url> -H 'Header: Value'` | Add a custom header |

## Flags

| Flag | Description |
| --- | --- |
| `-X <method>` | HTTP method (`GET`, `POST`, etc.) |
| `--json <body>` | Send a JSON body (implies `-X POST`) |
| `-H <header>` | Add a custom header |
| `--dry-run` | Preview the payment cost and validate the request without spending |
| `-t` / `--toon-output` | Compact machine-readable output for scripts and agents |

## Examples

Preview cost before paying:

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

Execute a paid request:

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

Discover the right URL and request schema first with [`tempo wallet services`](/docs/cli/wallet#service-discovery).

## Learn more

<Cards>
  <Card title="MPP protocol" description="Challenges, credentials, and receipts" to="https://mpp.dev/protocol" icon="lucide:book-open" />

  <Card title="tempo wallet" description="Authenticate and discover services" to="/docs/cli/wallet" icon="lucide:wallet" />

  <Card title="MPP SDKs" description="TypeScript, Python, and Rust libraries" to="https://mpp.dev/sdk" icon="lucide:code" />

  <Card title="Accept payments" description="Add MPP to your own API" to="/docs/guide/machine-payments/server" icon="lucide:server" />
</Cards>
