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

# Introduction

> SafeFetch is a safety layer for AI actions. Give it a URL and a body. It makes the request with retries and stored results.

## What is SafeFetch?

SafeFetch is a **safety layer for AI actions**. You send actions via REST API, the SafeFetch CLI, or MCP tool calls. SafeFetch makes reliable HTTP requests to any URL you specify — API endpoints, internal services, third-party APIs — with retries, HMAC signatures, and stored results. Start with the [Quickstart](/quickstart), then see [CLI Install](/cli/install), [MCP Setup](/mcp/setup), and the [API Reference](/api-reference/overview).

<CardGroup cols={2}>
  <Card title="One API call" icon="rocket">
    `POST /v1/actions` with a URL and body. That's it. No SDK required, no workers, no Redis.
  </Card>

  <Card title="Stored results" icon="database">
    Every action's response is stored and retrievable. No callback endpoints, no log diving.
  </Card>

  <Card title="Human approval" icon="shield-check">
    Pause actions for human sign-off before execution. First-class support for consequential actions.
  </Card>

  <Card title="MCP-native" icon="robot">
    Built-in MCP server so AI agents can send and manage actions as tool calls.
  </Card>
</CardGroup>

## Quick example

```bash theme={null}
# Send an action
curl -X POST https://api.safefetch.dev/v1/actions \
  -H "Authorization: Bearer sf_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://myapp.com/process",
    "body": { "file": "data.csv" }
  }'

# Check the result later
curl https://api.safefetch.dev/v1/actions/act_V1StGXR8_Z5j \
  -H "Authorization: Bearer sf_live_..."
```

## Action lifecycle

```
pending -> active -> completed     (success)
pending -> active -> pending       (retry on failure)
pending -> active -> failed        (retries exhausted)
pending -> cancelled               (user cancelled)
pending -> awaiting_approval -> pending -> ...  (approval flow)
```

## Key features

* **Per-action pricing** - Simple, predictable. No per-message multiplication.
* **Exponential backoff** - 20s, 40s, 80s... up to 1 hour between retries.
* **HMAC signatures** - Every HTTP request is signed so your endpoint can verify delivery authenticity.
* **Deduplication** - Prevent duplicate execution with dedupe keys.
* **Idempotency** - `Idempotency-Key` header prevents double-submission.
* **Rate limiting** - Built-in per-account rate limiting.
* **Request IDs** - Every response includes `X-Request-Id` for tracing.
