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

# Quote an Intents route

> Parse a deposit, swap or withdrawal request and return a route with funding legs. dry defaults to true for route preview.



## OpenAPI

````yaml openapi.json POST /api/near/intents/quote
openapi: 3.0.3
info:
  title: Man0 API
  version: 1.0.0
  description: Man0 workflows, catalog, accounts and NEAR Intents.
servers:
  - url: https://api.man0.space
security: []
tags:
  - name: System
  - name: Accounts
  - name: Authentication
  - name: Catalog
  - name: Vibe and media
  - name: Workflows
  - name: Drafts
  - name: Execution
  - name: Analytics
  - name: NEAR accounts
  - name: Intents
paths:
  /api/near/intents/quote:
    post:
      tags:
        - Intents
      summary: Quote an Intents route
      description: >-
        Parse a deposit, swap or withdrawal request and return a route with
        funding legs. dry defaults to true for route preview.
      operationId: intents_quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/intentsQuoteBody'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IntentRoute'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication required or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Permission or current consent required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Resource or policy changed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: >-
            Request body exceeds the size limit. Upload attachments accept at
            most 20 MB of decoded file bytes.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Request rate exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Service unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - man0Auth: []
components:
  schemas:
    intentsQuoteBody:
      type: object
      properties:
        prompt:
          type: string
          minLength: 1
          maxLength: 2000
        dry:
          default: true
          type: boolean
        connectedWallets:
          maxItems: 20
          type: array
          items:
            type: object
            properties:
              network:
                type: string
                enum:
                  - evm
                  - svm
                  - near
              address:
                type: string
                minLength: 1
                maxLength: 160
            required:
              - network
              - address
      required:
        - prompt
    IntentRoute:
      type: object
      properties:
        action:
          type: string
          enum:
            - deposit
            - swap
            - withdraw
        depositType:
          type: string
          enum:
            - INTENTS
            - ORIGIN_CHAIN
        originToken:
          $ref: '#/components/schemas/IntentToken'
        originChainLabel:
          type: string
        originWalletNetwork:
          type: string
          enum:
            - evm
            - svm
            - near
        originWalletAddress:
          type: string
        intentsAccountId:
          type: string
        hexChainId:
          type: string
        destinationToken:
          $ref: '#/components/schemas/IntentToken'
        destinationChainLabel:
          type: string
        recipientAddress:
          type: string
        amountAtomic:
          type: string
        displayAmount:
          type: string
        quote:
          $ref: '#/components/schemas/IntentQuote'
        legs:
          type: array
          items:
            $ref: '#/components/schemas/IntentLeg'
        totalOutFormatted:
          type: string
        totalOutUsd:
          type: string
      required:
        - action
        - depositType
        - originToken
        - originChainLabel
        - originWalletNetwork
        - originWalletAddress
        - destinationToken
        - destinationChainLabel
        - recipientAddress
        - amountAtomic
        - displayAmount
        - quote
        - legs
        - totalOutFormatted
        - totalOutUsd
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        threadId:
          type: string
        missing:
          type: array
          items:
            $ref: '#/components/schemas/MissingConnectorRequirement'
        missingInputs:
          type: array
          items:
            $ref: '#/components/schemas/MissingInputRequirement'
      required:
        - error
    IntentToken:
      type: object
      properties:
        assetId:
          type: string
        decimals:
          type: number
        blockchain:
          type: string
        symbol:
          type: string
        price:
          type: number
        contractAddress:
          type: string
      required:
        - assetId
        - decimals
        - blockchain
        - symbol
        - price
    IntentQuote:
      type: object
      properties:
        depositAddress:
          type: string
        depositMemo:
          nullable: true
          type: string
        amountIn:
          type: string
        amountInFormatted:
          type: string
        amountInUsd:
          type: string
        amountOut:
          type: string
        amountOutFormatted:
          type: string
        amountOutUsd:
          type: string
        minAmountOut:
          type: string
        deadline:
          type: string
        timeWhenInactive:
          type: string
        timeEstimate:
          type: number
      required:
        - amountIn
        - amountInFormatted
        - amountOut
        - amountOutFormatted
    IntentLeg:
      type: object
      properties:
        source:
          type: string
          enum:
            - intents
            - account
            - external
        depositType:
          type: string
          enum:
            - INTENTS
            - ORIGIN_CHAIN
        originToken:
          $ref: '#/components/schemas/IntentToken'
        originChainLabel:
          type: string
        originExplorerUrl:
          type: string
        originWalletNetwork:
          type: string
          enum:
            - evm
            - svm
            - near
        originWalletAddress:
          type: string
        intentsAccountId:
          type: string
        hexChainId:
          type: string
        destinationToken:
          $ref: '#/components/schemas/IntentToken'
        destinationChainLabel:
          type: string
        recipientAddress:
          type: string
        amountAtomic:
          type: string
        displayAmount:
          type: string
        quote:
          $ref: '#/components/schemas/IntentQuote'
      required:
        - source
        - depositType
        - originToken
        - originChainLabel
        - originWalletNetwork
        - originWalletAddress
        - destinationToken
        - destinationChainLabel
        - recipientAddress
        - amountAtomic
        - displayAmount
        - quote
    MissingConnectorRequirement:
      type: object
      properties:
        entryId:
          type: string
        slug:
          type: string
        name:
          type: string
        type:
          type: string
          enum:
            - account
            - gated
        userAddress:
          type: string
        missingVars:
          type: array
          items:
            type: object
            properties:
              varName:
                type: string
              description:
                type: string
              obtainUrl:
                type: string
            required:
              - varName
        reason:
          type: string
        agentWallet:
          type: string
        runId:
          type: string
        threadId:
          type: string
        requestId:
          type: string
      required:
        - entryId
        - slug
        - name
        - type
        - reason
    MissingInputRequirement:
      type: object
      properties:
        stepId:
          type: string
        stepLabel:
          type: string
        modelId:
          type: string
        modelName:
          type: string
        acceptedInputs:
          type: array
          items:
            type: string
        questions:
          type: array
          items:
            type: string
        reason:
          type: string
        agentWallet:
          type: string
        runId:
          type: string
        threadId:
          type: string
        proposalId:
          type: string
      required:
        - stepId
        - stepLabel
        - acceptedInputs
        - reason
  securitySchemes:
    man0Auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Man0 authentication token returned by sign-in.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.