---
title: "Quote earned-fund withdrawal"
method: POST
path: "/ais/{aiId}/billing/withdrawal-quotes"
tags: ["Billing"]
---

# Quote earned-fund withdrawal

`POST /ais/{aiId}/billing/withdrawal-quotes`

## Request

- Base URL: `https://api.darwin.so/api/v1`
- URL: `https://api.darwin.so/api/v1/ais/{aiId}/billing/withdrawal-quotes`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Returns the exact provider cost and expected bank payout for a standard or instant withdrawal. Only settled earned funds are withdrawable.

## Path parameters

- `aiId` string, required

## Request body

- WithdrawalRequest
  - `amountMinor` integer, required
  - `speed` 'standard' | 'instant'

## Response `200`

The withdrawal quote.

- WithdrawalQuote
  - `speed` 'STANDARD' | 'INSTANT', required
  - `withdrawalAmountMinor` integer, required
  - `providerFeeMinor` integer, required
  - `payoutAmountMinor` integer, required
  - `rate` FeeRate, required
    - `variableBps` integer, required
    - `fixedMinor` integer, required
  - `currency` 'usd', required

## Other responses

- `400`: The request was invalid.
- `401`: The API key or access token is missing, invalid, expired, or revoked.
- `403`: The principal does not have the required scope or resource access.
- `404`: The resource was not found for this principal.

---

[API](https://skmtc.dev/darwin/apis/darwin-api.md) · [All operations](https://skmtc.dev/darwin/apis/darwin-api/llms.txt) · [OpenAPI document](https://skmtc.dev/darwin/apis/darwin-api/revisions/56166fce7bfb?raw)
