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

# Api

# DZap API

DZap exposes REST APIs for DeFi aggregation, intent execution, and AI-agent workflows.

## Base URLs

* Fuse API: `https://zap.dzap.io`
* Trade API: `https://api.dzap.io`
* AI runtime: `https://nlp-ai-439689868940.europe-north1.run.app`

## Authentication

The Fuse API is public and rate-limited per IP. The Trade API supports optional bearer API keys for higher rate limits and partner configuration.

```bash theme={null}
curl -X POST https://api.dzap.io/v1/quotes \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer dzap_xxxxxxxxxxxxxxxxxxxxxxxx" \
  -d '{ "data": [] }'
```

See `https://docs.dzap.io/auth.md` for agent-auth discovery, credential claims, revocation, and `WWW-Authenticate` guidance.

## Quote example

```bash theme={null}
curl -X POST https://zap.dzap.io/v1/quote \
  -H "Content-Type: application/json" \
  -d '{
    "srcChainId": 42161,
    "destChainId": 42161,
    "account": "0xYourAddress",
    "srcToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
    "destToken": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
    "amount": "1000000",
    "slippage": 1
  }'
```

## Conventions

* Amounts are strings in wei or token base units.
* Native tokens use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`.
* Slippage is percent: `1` means one percent.
* Mutation endpoints accept `Idempotency-Key`.
* Non-2xx responses use typed JSON errors with `status`, `code`, `message`, `requestId`, and optional `retryAfter`.

## OpenAPI

* YAML: `https://docs.dzap.io/openapi.yaml`
* API-scoped mirror: `https://docs.dzap.io/api/openapi.yaml`
