> ## 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.

# Generate Transaction

> This is the second step when bridging tokens. After computing a route with Compute Route (`POST /v2/fungible/route`), pass the route details and your addresses to this endpoint. It returns signable transaction messages that you can broadcast to the source chain.

The typical flow is: **Compute Route** → **Generate Transaction** → sign and broadcast → **Track Transaction**.



## OpenAPI

````yaml /api-reference/router-api/openapi.yaml post /v2/fungible/msgs
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/msgs:
    post:
      tags:
        - Routing
      summary: Generate Transaction
      description: >-
        This is the second step when bridging tokens. After computing a route
        with Compute Route (`POST /v2/fungible/route`), pass the route details
        and your addresses to this endpoint. It returns signable transaction
        messages that you can broadcast to the source chain.


        The typical flow is: **Compute Route** → **Generate Transaction** → sign
        and broadcast → **Track Transaction**.
      operationId: generateTransaction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - amount_in
                - amount_out
                - source_asset_chain_id
                - source_asset_denom
                - dest_asset_chain_id
                - dest_asset_denom
                - address_list
                - operations
                - slippage_tolerance_percent
              properties:
                amount_in:
                  type: string
                  description: Input amount in smallest denomination.
                amount_out:
                  type: string
                  description: Expected output amount from the route response.
                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.
                address_list:
                  type: array
                  description: >-
                    Array of recipient and/or sender address for each chain in
                    the path, corresponding to the required_chain_addresses
                    array returned from a route request.
                  minItems: 2
                  items:
                    type: string
                operations:
                  type: array
                  description: Route operations from the /v2/fungible/route response.
                  items:
                    type: object
                slippage_tolerance_percent:
                  type: string
                  description: Slippage tolerance as a percentage (e.g. "1" for 1%).
                signed_op_hook:
                  type: object
                  description: >-
                    Signed OP hook data, required when the route has
                    required_op_hook true.
                  properties:
                    hook:
                      type: string
                      description: Hook data.
                    signer:
                      type: string
                      description: Signer address.
            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...
              address_list:
                - init1abc...
                - 0xdef...
              operations: []
              slippage_tolerance_percent: '1'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  txs:
                    type: array
                    description: >-
                      Array of transaction objects. Each can be a cosmos_tx,
                      evm_tx, or svm_tx.
                    items:
                      type: object
                      properties:
                        cosmos_tx:
                          type: object
                          properties:
                            chain_id:
                              type: string
                              description: Target chain ID.
                            msgs:
                              type: array
                              description: Array of Cosmos SDK messages.
                              items:
                                type: object
                            signer_address:
                              type: string
                              description: Address that must sign the transaction.
              example:
                txs:
                  - cosmos_tx:
                      chain_id: interwoven-1
                      msgs: []
                      signer_address: init1abc...

````