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

# Create Quote

> Generate a one-time deposit address for a cross-chain payment.

## Example request

```bash theme={null}
curl --location 'https://godirekt.xyz/api/quote' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "fromChainId": 8453,
    "toChainId": 56,
    "fromToken": "0x0000000000000000000000000000000000000000",
    "toToken": "0x0000000000000000000000000000000000000000",
    "amount": "1",
    "recipient": "0xa110c77fa4b07ab601e63ecd65e99ddb8f1df6ec"
  }'
```

## Example response

```json theme={null}
{
  "success": true,
  "quoteId": "5af8532c-5bf4-45c2-b099-1b36e96e91a3",
  "expiresIn": 300,
  "send": {
    "depositAddress": "0x7fa491b5765b5eea6b113a9121c311d780f8c61b",
    "chain": { "id": 8453, "name": "Base" },
    "token": {
      "address": "0x0000000000000000000000000000000000000000",
      "symbol": "ETH",
      "name": "Ether",
      "decimals": 18
    },
    "amount": "1"
  },
  "receive": {
    "chain": { "id": 56, "name": "BNB Chain" },
    "token": {
      "address": "0x0000000000000000000000000000000000000000",
      "symbol": "BNB",
      "name": "Binance Coin",
      "decimals": 18
    },
    "estimatedAmount": "3.119712602260738657",
    "estimatedAmountUsd": "1992.034702"
  },
  "recipient": "0xa110c77fa4b07ab601e63ecd65e99ddb8f1df6ec",
  "fees": {
    "totalUsd": "13.4972",
    "gas": { "amount": "0.000000144979173281", "usd": "0.000291", "currency": "ETH" },
    "relayer": { "amount": "0.001729747908604578", "usd": "3.469103", "currency": "ETH" },
    "app": { "amount": "0.005", "usd": "10.027770", "currency": "ETH" }
  },
  "estimatedTime": "1s",
  "steps": 1,
  "statusUrl": "/api/status/5af8532c-5bf4-45c2-b099-1b36e96e91a3",
  "depositNote": "Send exactly this amount to the deposit address. Execution begins automatically."
}
```

## Response fields

| Field                        | Description                                     |
| ---------------------------- | ----------------------------------------------- |
| `quoteId`                    | Use this to poll `/api/status/:id`              |
| `expiresIn`                  | Seconds before the quote expires (300 = 5 mins) |
| `send.depositAddress`        | Address the user must send funds to             |
| `send.amount`                | Exact amount to send                            |
| `receive.estimatedAmount`    | Estimated tokens the recipient gets             |
| `receive.estimatedAmountUsd` | USD value of received amount                    |
| `fees.totalUsd`              | Total fees in USD                               |
| `statusUrl`                  | Shorthand URL to check payment status           |
| `depositNote`                | Human-readable instruction to show the user     |

## Example request

```bash theme={null}
curl --location 'https://godirekt.xyz/api/quote' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "fromChainId": 8453,
    "toChainId": 56,
    "fromToken": "0x0000000000000000000000000000000000000000",
    "toToken": "0x0000000000000000000000000000000000000000",
    "amount": "1",
    "recipient": "0xa110c77fa4b07ab601e63ecd65e99ddb8f1df6ec"
  }'
```

## Example response

```json theme={null}
{
  "success": true,
  "quoteId": "5af8532c-5bf4-45c2-b099-1b36e96e91a3",
  "expiresIn": 300,
  "send": {
    "depositAddress": "0x7fa491b5765b5eea6b113a9121c311d780f8c61b",
    "chain": { "id": 8453, "name": "Base" },
    "token": {
      "address": "0x0000000000000000000000000000000000000000",
      "symbol": "ETH",
      "name": "Ether",
      "decimals": 18
    },
    "amount": "1"
  },
  "receive": {
    "chain": { "id": 56, "name": "BNB Chain" },
    "token": {
      "address": "0x0000000000000000000000000000000000000000",
      "symbol": "BNB",
      "name": "Binance Coin",
      "decimals": 18
    },
    "estimatedAmount": "3.119712602260738657",
    "estimatedAmountUsd": "1992.034702"
  },
  "recipient": "0xa110c77fa4b07ab601e63ecd65e99ddb8f1df6ec",
  "fees": {
    "totalUsd": "13.4972",
    "gas": { "amount": "0.000000144979173281", "usd": "0.000291", "currency": "ETH" },
    "relayer": { "amount": "0.001729747908604578", "usd": "3.469103", "currency": "ETH" },
    "app": { "amount": "0.005", "usd": "10.027770", "currency": "ETH" }
  },
  "estimatedTime": "1s",
  "steps": 1,
  "statusUrl": "/api/status/5af8532c-5bf4-45c2-b099-1b36e96e91a3",
  "depositNote": "Send exactly this amount to the deposit address. Execution begins automatically."
}
```

## Response fields

| Field                        | Description                                     |
| ---------------------------- | ----------------------------------------------- |
| `quoteId`                    | Use this to poll `/api/status/:id`              |
| `expiresIn`                  | Seconds before the quote expires (300 = 5 mins) |
| `send.depositAddress`        | Address the user must send funds to             |
| `send.amount`                | Exact amount to send                            |
| `receive.estimatedAmount`    | Estimated tokens the recipient gets             |
| `receive.estimatedAmountUsd` | USD value of received amount                    |
| `fees.totalUsd`              | Total fees in USD                               |
| `statusUrl`                  | Shorthand URL to check payment status           |
| `depositNote`                | Human-readable instruction to show the user     |


## OpenAPI

````yaml POST /api/quote
openapi: 3.1.0
info:
  title: Direkt API
  description: Accept crypto payments directly — no custodians, no prefunding.
  version: 1.0.0
servers:
  - url: https://godirekt.xyz
    description: Production
security:
  - apiKeyHeader: []
paths:
  /api/quote:
    post:
      summary: Create a quote
      description: Generate a one-time deposit address for a cross-chain payment.
      operationId: createQuote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - fromChainId
                - toChainId
                - fromToken
                - toToken
                - amount
                - recipient
              properties:
                fromChainId:
                  type: integer
                  description: Source chain ID
                  example: 8453
                toChainId:
                  type: integer
                  description: Destination chain ID
                  example: 56
                fromToken:
                  type: string
                  description: >-
                    Token address on source chain. Use 0x000...000 for native
                    token.
                  example: '0x0000000000000000000000000000000000000000'
                toToken:
                  type: string
                  description: >-
                    Token address on destination chain. Use 0x000...000 for
                    native token.
                  example: '0x0000000000000000000000000000000000000000'
                amount:
                  type: string
                  description: Amount in human-readable units
                  example: '1'
                recipient:
                  type: string
                  description: Wallet address to receive funds on destination chain
                  example: '0xa110c77fa4b07ab601e63ecd65e99ddb8f1df6ec'
      responses:
        '200':
          description: Quote created successfully
          content:
            application/json:
              example:
                success: true
                quoteId: 5af8532c-5bf4-45c2-b099-1b36e96e91a3
                expiresIn: 300
                send:
                  depositAddress: '0x7fa491b5765b5eea6b113a9121c311d780f8c61b'
                  chain:
                    id: 8453
                    name: Base
                  token:
                    address: '0x0000000000000000000000000000000000000000'
                    symbol: ETH
                    name: Ether
                    decimals: 18
                  amount: '1'
                receive:
                  chain:
                    id: 56
                    name: BNB Chain
                  token:
                    address: '0x0000000000000000000000000000000000000000'
                    symbol: BNB
                    name: Binance Coin
                    decimals: 18
                  estimatedAmount: '3.119712602260738657'
                  estimatedAmountUsd: '1992.034702'
                recipient: '0xa110c77fa4b07ab601e63ecd65e99ddb8f1df6ec'
                fees:
                  totalUsd: '13.4972'
                  gas:
                    amount: '0.000000144979173281'
                    usd: '0.000291'
                    currency: ETH
                  relayer:
                    amount: '0.001729747908604578'
                    usd: '3.469103'
                    currency: ETH
                  app:
                    amount: '0.005'
                    usd: '10.027770'
                    currency: ETH
                estimatedTime: 1s
                steps: 1
                statusUrl: /api/status/5af8532c-5bf4-45c2-b099-1b36e96e91a3
                depositNote: >-
                  Send exactly this amount to the deposit address. Execution
                  begins automatically.
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  quoteId:
                    type: string
                  expiresIn:
                    type: integer
                  send:
                    type: object
                  receive:
                    type: object
                  recipient:
                    type: string
                  fees:
                    type: object
                  estimatedTime:
                    type: string
                  steps:
                    type: integer
                  statusUrl:
                    type: string
                  depositNote:
                    type: string
components:
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````