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

# Compute Route

> This is the first step when bridging tokens between chains. Call this endpoint with your source and destination assets to find the optimal transfer route. The response includes the expected output amount, USD value estimates, and an ordered list of operations.

After receiving a route, pass the full response (including `operations`) to the Generate Transaction endpoint (`POST /v2/fungible/msgs`) to get signable transaction messages you can broadcast.



## OpenAPI

````yaml /api-reference/router-api/openapi.yaml post /v2/fungible/route
openapi: 3.1.0
info:
  title: Router API
  description: Cross-chain transfer routing API for the Initia ecosystem.
  version: 1.0.0
servers:
  - url: https://router-api.initia.xyz
    description: Mainnet
  - url: https://router-api.initiation-2.initia.xyz
    description: Testnet
security: []
paths:
  /v2/fungible/route:
    post:
      tags:
        - Routing
      summary: Compute Route
      description: >-
        This is the first step when bridging tokens between chains. Call this
        endpoint with your source and destination assets to find the optimal
        transfer route. The response includes the expected output amount, USD
        value estimates, and an ordered list of operations.


        After receiving a route, pass the full response (including `operations`)
        to the Generate Transaction endpoint (`POST /v2/fungible/msgs`) to get
        signable transaction messages you can broadcast.
      operationId: computeRoute
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - amount_in
                - source_asset_chain_id
                - source_asset_denom
                - dest_asset_chain_id
                - dest_asset_denom
              properties:
                amount_in:
                  type: string
                  description: >-
                    Amount to send in the smallest denomination (e.g. "1000000"
                    for 1 INIT).
                source_asset_chain_id:
                  type: string
                  description: Source chain ID.
                source_asset_denom:
                  type: string
                  description: Source asset denomination.
                dest_asset_chain_id:
                  type: string
                  description: Destination chain ID.
                dest_asset_denom:
                  type: string
                  description: Destination asset denomination.
                allow_unsafe:
                  type: boolean
                  default: true
                  description: Allow routes that may have higher risk.
                go_fast:
                  type: boolean
                  description: Use Go Fast bridging. Automatically determined if not set.
                is_op_withdraw:
                  type: boolean
                  description: Force an Optimistic withdrawal route.
            example:
              amount_in: '1000000'
              source_asset_chain_id: interwoven-1
              source_asset_denom: uinit
              dest_asset_chain_id: '8453'
              dest_asset_denom: 0x...
              allow_unsafe: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  amount_in:
                    type: string
                    description: Input amount.
                  amount_out:
                    type: string
                    description: Expected output amount.
                  source_asset_chain_id:
                    type: string
                    description: Source chain ID.
                  source_asset_denom:
                    type: string
                    description: Source asset denom.
                  dest_asset_chain_id:
                    type: string
                    description: Destination chain ID.
                  dest_asset_denom:
                    type: string
                    description: Destination asset denom.
                  operations:
                    type: array
                    description: Ordered list of transfer operations to execute.
                    items:
                      type: object
                  required_chain_addresses:
                    type: array
                    description: >-
                      All chain IDs that require an address, in order of usage
                      by operations in the route. Use this to populate the
                      address_list parameter in the Generate Transaction
                      request.
                    items:
                      type: string
                  chain_ids:
                    type: array
                    description: Ordered list of all chain IDs involved in the route.
                    items:
                      type: string
                  does_swap:
                    type: boolean
                    description: Whether the route involves a token swap.
                  estimated_amount_out:
                    type: string
                    description: >-
                      Estimated output amount before fees and slippage
                      adjustments.
                  estimated_fees:
                    type: array
                    description: >-
                      Estimated fees for the route. Each entry describes a fee
                      with its amount, behavior, and the originating asset.
                    items:
                      type: object
                      properties:
                        amount:
                          type: string
                          description: Fee amount in the smallest denomination.
                        fee_behavior:
                          type: string
                          description: >-
                            How the fee is applied (e.g.
                            FEE_BEHAVIOR_ADDITIONAL, FEE_BEHAVIOR_DEDUCTED).
                        origin_asset:
                          type: object
                          description: The asset in which the fee is denominated.
                          properties:
                            denom:
                              type: string
                            chain_id:
                              type: string
                        usd_amount:
                          type: string
                          nullable: true
                          description: USD value of the fee, if available.
                  estimated_route_duration_seconds:
                    type: integer
                    nullable: true
                    description: Estimated time in seconds for the route to complete.
                  txs_required:
                    type: integer
                    description: Number of transactions required to execute the route.
                  swap_venues:
                    type: array
                    description: DEX venues used for swaps in the route, if any.
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                          description: Swap venue name.
                        chain_id:
                          type: string
                          description: Chain ID where the swap occurs.
                        logo_uri:
                          type: string
                          description: URL to the swap venue logo.
                  swap_venue:
                    type: object
                    description: Primary DEX venue used for the route's swap.
                    properties:
                      name:
                        type: string
                        description: Swap venue name.
                      chain_id:
                        type: string
                        description: Chain ID where the swap occurs.
                      logo_uri:
                        type: string
                        description: URL to the swap venue logo.
                  swap_price_impact_percent:
                    type: string
                    description: Estimated price impact percentage for the swap.
                  usd_amount_in:
                    type: string
                    description: USD value of the input amount.
                  usd_amount_out:
                    type: string
                    description: USD value of the output amount.
                  warning:
                    type: object
                    nullable: true
                    description: Price impact warning (present when impact exceeds 5%).
                    properties:
                      type:
                        type: string
                        description: Warning type (e.g. BAD_PRICE_WARNING).
                      message:
                        type: string
                        description: Human-readable warning message.
                  extra_warnings:
                    type: array
                    nullable: true
                    description: >-
                      Additional warning messages for the route, such as
                      withdrawal duration notices.
                    items:
                      type: string
                  required_op_hook:
                    type: boolean
                    description: Whether an OP hook is required for this route.
              example:
                amount_in: '1000000'
                amount_out: '999000'
                source_asset_chain_id: interwoven-1
                source_asset_denom: uinit
                dest_asset_chain_id: '8453'
                dest_asset_denom: 0x...
                operations: []
                required_chain_addresses:
                  - interwoven-1
                  - '8453'
                chain_ids:
                  - interwoven-1
                  - '8453'
                does_swap: false
                estimated_amount_out: '999000'
                estimated_fees: []
                estimated_route_duration_seconds: 60
                txs_required: 1
                swap_venues: []
                usd_amount_in: '1.50'
                usd_amount_out: '1.49'
                warning: null
                extra_warnings: null
                required_op_hook: false

````