# Jupiter — Swap API V2 — Prepare unsigned build Transaction

Get Jupiter Swap V2 Build Instructions data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Jupiter, pass parameters such as amount, inputMint, outputMint, and retrieve structured data including swap instruction program address, swap instruction account requirements, setup instruction collection, compute-budget instruction collection, and cleanup instruction component for wallet assembly, and route inspection.

Documentation: https://openany.si/market/apis/jupiter/jupiter-swap-api-v2-prepare-unsigned-build-transaction/?offering=f8f3266c-4527-4cac-92df-e5421335aad1
API ID: f8f3266c-4527-4cac-92df-e5421335aad1
Provider: jupiter
Contract revision: 5
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/jupiter/swap/v2/build
Page update time: 2026-12-03T02:49:39.461Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:49:38.828Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Jupiter — Swap API V2 — Prepare unsigned build Transaction request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "inputMint": {
          "type": "string",
          "description": "The mint address of the input token"
        },
        "outputMint": {
          "type": "string",
          "description": "The mint address of the output token"
        },
        "amount": {
          "type": "string",
          "description": "The amount to swap in the smallest unit of the input token"
        },
        "taker": {
          "type": "string",
          "description": "Public key of the user initiating the swap."
        },
        "slippageBps": {
          "type": "string",
          "description": "Slippage tolerance in basis points. Defaults to 50. Import profile accepts the string branch only; other union branches are not exposed.",
          "enum": [
            "rtse"
          ]
        },
        "mode": {
          "type": "string",
          "description": "Quoting mode. \"fast\" trades quote optimality for reduced latency.",
          "enum": [
            "fast"
          ]
        },
        "dexes": {
          "type": "string",
          "description": "- Comma-separated list of DEXes to restrict routing to.\n- Labels are case sensitive (`SolFi`, not `solfi`). An unrecognised label is not a validation error: it returns `400 {\"error\": \"No routes found\"}`, indistinguishable from a pair with no liquidity.\n- Mutually exclusive with excludeDexes. Passing both returns `400 {\"error\": \"dexes and excludeDexes are mutually exclusive\"}`.\n- Full list of DEXes here using the `/program-id-to-label` endpoint."
        },
        "excludeDexes": {
          "type": "string",
          "description": "- Comma-separated list of DEXes to exclude.\n- Labels are case sensitive (`SolFi`, not `solfi`).\n- Mutually exclusive with dexes.\n- Full list of DEXes here using the `/program-id-to-label` endpoint."
        },
        "platformFeeBps": {
          "type": "integer",
          "description": "Platform fee in basis points. If positive, feeAccount is required.",
          "minimum": 0,
          "maximum": 10000
        },
        "feeAccount": {
          "type": "string",
          "description": "Token account to collect platform fees. Required if platformFeeBps is positive."
        },
        "maxAccounts": {
          "type": "integer",
          "description": "Maximum number of accounts for the swap route. Defaults to 64.",
          "minimum": 1,
          "maximum": 64
        },
        "payer": {
          "type": "string",
          "description": "Account that pays transaction fees and rent. Defaults to taker when not passed in."
        },
        "wrapAndUnwrapSol": {
          "type": "boolean",
          "description": "Whether to wrap/unwrap SOL. Defaults to true."
        },
        "destinationTokenAccount": {
          "type": "string",
          "description": "- SPL token account to receive output tokens.\n- Mutually exclusive with nativeDestinationAccount."
        },
        "nativeDestinationAccount": {
          "type": "string",
          "description": "- Native SOL account to receive output.\n- Mutually exclusive with destinationTokenAccount."
        },
        "blockhashSlotsToExpiry": {
          "type": "integer",
          "description": "Number of slots until the blockhash expires. Defaults to 150.",
          "minimum": 1,
          "maximum": 300
        },
        "tipAmount": {
          "type": "string",
          "description": "SOL tip amount in lamports. Adds a tip instruction for use with /submit. The tip payer is the taker (or payer if specified)."
        },
        "computeUnitPricePercentile": {
          "type": "string",
          "description": "Percentile of compute unit price to use. Named levels: \"medium\" (25th), \"high\" (50th), \"veryHigh\" (75th), or a number 0-10000 in basis points. Import profile accepts the string branch only; other union branches are not exposed.",
          "enum": [
            "medium",
            "high",
            "veryHigh"
          ]
        },
        "forJitoBundle": {
          "type": "boolean",
          "description": "Set to `true` if the transaction will be submitted as part of a Jito bundle.\nThis excludes DEXes that are incompatible with Jito bundles."
        },
        "transactionVersion": {
          "type": "string",
          "description": "The Solana transaction version to build for, `\"0\"` or `\"1\"`. Defaults to `\"0\"`.\n`\"1\"` returns v1 instructions: `computeBudgetInstructions` is empty and `addressesByLookupTableAddress` is `{}` (v1 inlines accounts, no lookup tables). Set the compute budget, including the returned `computeUnitPrice`, on the message config. Build with a v1-capable SDK (`@solana/kit` v8 or later).",
          "enum": [
            "0",
            "1"
          ]
        },
        "maxBytes": {
          "type": "integer",
          "description": "Target maximum transaction size in bytes, leaving room for your own instructions.\n\n- Sizing is deterministic, not an estimate: Metis builds and serializes the route to measure it. The swap it returns always fits your budget.\n- Counts the bare swap only. Anything you add on top is not counted, so your final transaction can still exceed it: request parameters (`payer`, `feeAccount`, `tipAmount`, destination accounts, close authority, cashback), your own instructions, extra signers, and your own lookup tables.\n- Set the budget below 1232 to leave room, then serialize your final transaction and lower `maxBytes` further if it still exceeds 1232. As a rough guide, each added account costs 1 byte if in your lookup table else 32, and each extra signer about 96 bytes.\n- v0 only (400 with `transactionVersion=1`).\n",
          "minimum": 1,
          "maximum": 1232
        }
      },
      "required": [
        "inputMint",
        "outputMint",
        "amount",
        "taker"
      ]
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "addressesByLookupTableAddress": {
      "type": "object",
      "properties": {
        "13t3zQRgBuWNVHaxzD2Uf3ELzFaFr8civojnjH4MiRs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "5a1fzA5giAgNUq4s8gRaEFuJew4Q2ePU9h159xeUS37x": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "Bu5FqnUDrKcpeC4ikT3og9qFx3VqYcqVVi9NEGQfBtpH": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "C4wHbJ2nx5ys544Li6R4QLCbiMY8FrBK3Xjsact93kTw": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "blockhashWithMetadata": {
      "type": "object",
      "properties": {
        "blockhash": {
          "type": "array",
          "items": {
            "type": "integer"
          }
        },
        "fetchedAt": {
          "type": "object",
          "properties": {
            "nanos_since_epoch": {
              "type": "integer"
            },
            "secs_since_epoch": {
              "type": "integer"
            }
          }
        },
        "lastValidBlockHeight": {
          "type": "integer"
        }
      }
    },
    "cleanupInstruction": {
      "type": "object",
      "properties": {
        "accounts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "isSigner": {
                "type": "boolean"
              },
              "isWritable": {
                "type": "boolean"
              },
              "pubkey": {
                "type": "string"
              }
            }
          }
        },
        "data": {
          "type": "string"
        },
        "programId": {
          "type": "string"
        }
      }
    },
    "computeBudgetInstructions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "accounts": {
            "type": "array",
            "items": {}
          },
          "data": {
            "type": "string"
          },
          "programId": {
            "type": "string"
          }
        }
      }
    },
    "inAmount": {
      "type": "string"
    },
    "inputMint": {
      "type": "string"
    },
    "otherAmountThreshold": {
      "type": "string"
    },
    "otherInstructions": {
      "type": "array",
      "items": {}
    },
    "outAmount": {
      "type": "string"
    },
    "outputMint": {
      "type": "string"
    },
    "priceImpactPct": {
      "type": "string"
    },
    "routePlan": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "bps": {
            "type": "integer"
          },
          "percent": {
            "type": "number"
          },
          "swapInfo": {
            "type": "object",
            "properties": {
              "ammKey": {
                "type": "string"
              },
              "inAmount": {
                "type": "string"
              },
              "inputMint": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "outAmount": {
                "type": "string"
              },
              "outputMint": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "setupInstructions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "isSigner": {
                  "type": "boolean"
                },
                "isWritable": {
                  "type": "boolean"
                },
                "pubkey": {
                  "type": "string"
                }
              }
            }
          },
          "data": {
            "type": "string"
          },
          "programId": {
            "type": "string"
          }
        }
      }
    },
    "slippageBps": {
      "type": "integer"
    },
    "swapInstruction": {
      "type": "object",
      "properties": {
        "accounts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "isSigner": {
                "type": "boolean"
              },
              "isWritable": {
                "type": "boolean"
              },
              "pubkey": {
                "type": "string"
              }
            }
          }
        },
        "data": {
          "type": "string"
        },
        "programId": {
          "type": "string"
        }
      }
    },
    "swapMode": {
      "type": "string"
    },
    "tipInstruction": {
      "type": "null"
    },
    "transactionVersion": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Documentation example (source abbreviated)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/jupiter/swap/v2/build?amount=10000000&inputMint=So11111111111111111111111111111111111111112&outputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&taker=GkwFnmMDvn3HGMpJpWBg8tgJxr3NxNvg3AXxvXVPbRGJ' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "addressesByLookupTableAddress": {
    "13t3zQRgBuWNVHaxzD2Uf3ELzFaFr8civojnjH4MiRs": [
      "q7BVd2EPK5bmqbfWp4CrcMnJcuTdxYogQGH6XbNUaNR",
      "JCRGumoE9Qi5BBgULTgdgTLjSgkCMSbF62ZZfGs84JeU",
      "7hTckgnGnLQR6sdH7YkqFTAA7VwTfYFaZ6EhEsU3saCX"
    ],
    "5a1fzA5giAgNUq4s8gRaEFuJew4Q2ePU9h159xeUS37x": [
      "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
      "7VtfL8fvgNfhz17qKRMjzQEXgbdpnHHHQRh54R9jP2RJ",
      "BqaZiuYoDGSQKMVbn6ALSQzuNNNChKEeUR7HDpwqQNvu"
    ],
    "Bu5FqnUDrKcpeC4ikT3og9qFx3VqYcqVVi9NEGQfBtpH": [
      "HqBJt4NJz7XjbtqJe2fj6pmNDjptLSivseWfwGvmBBkE",
      "FLUXubRmkEi2q6K3Y9kBPg9248ggaZVsoSFhtJHSrm1X",
      "FPgdFKJ85XWhXg8qQHfZiHr7Z8KS72V6rUMFyYkirGvS"
    ],
    "C4wHbJ2nx5ys544Li6R4QLCbiMY8FrBK3Xjsact93kTw": [
      "BqaZiuYoDGSQKMVbn6ALSQzuNNNChKEeUR7HDpwqQNvu",
      "7iX6vUDC73yzCUZwoGzMyxq1eDNq3pYUDXimtgMKWHGk",
      "9hGCZPjdNxL4pjUsnz31gfvvJkV2qQf5pPH3RghGVU3u"
    ]
  },
  "blockhashWithMetadata": {
    "blockhash": [
      238,
      244,
      46
    ],
    "fetchedAt": {
      "nanos_since_epoch": 437865217,
      "secs_since_epoch": 1793341000
    },
    "lastValidBlockHeight": 441203302
  },
  "cleanupInstruction": {
    "accounts": [
      {
        "isSigner": false,
        "isWritable": true,
        "pubkey": "GSFbPvFTbfcRNGs4EEZVF8tBjV6ChcTaBrTYGGsDAq8o"
      },
      {
        "isSigner": false,
        "isWritable": true,
        "pubkey": "GkwFnmMDvn3HGMpJpWBg8tgJxr3NxNvg3AXxvXVPbRGJ"
      },
      {
        "isSigner": true,
        "isWritable": false,
        "pubkey": "GkwFnmMDvn3HGMpJpWBg8tgJxr3NxNvg3AXxvXVPbRGJ"
      }
    ],
    "data": "CQ==",
    "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
  },
  "computeBudgetInstructions": [
    {
      "accounts": [],
      "data": "A4IGAAAAAAAA",
      "programId": "ComputeBudget111111111111111111111111111111"
    }
  ],
  "inAmount": "10000000",
  "inputMint": "So11111111111111111111111111111111111111112",
  "otherAmountThreshold": "974726",
  "otherInstructions": [],
  "outAmount": "979624",
  "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "priceImpactPct": "0",
  "routePlan": [
    {
      "bps": 2966,
      "percent": 29.66,
      "swapInfo": {
        "ammKey": "5hCDEXRCn5YsyP1ydgbnaXT3QN6AAkfshfRkXRQypzr6",
        "inAmount": "2965558",
        "inputMint": "So11111111111111111111111111111111111111112",
        "label": "Whirlpool",
        "outAmount": "290522",
        "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
      }
    },
    {
      "bps": 7034,
      "percent": 70.34,
      "swapInfo": {
        "ammKey": "DyzGYEhdgSn5EEUt4XXviavZ7v7SV2YGrYV8HX3Aw5XT",
        "inAmount": "7034442",
        "inputMint": "So11111111111111111111111111111111111111112",
        "label": "Byreal",
        "outAmount": "690257",
        "outputMint": "USD1ttGY1N17NEEHLmELoaybftRBUSErhqYiQzvEmuB"
      }
    },
    {
      "bps": 10000,
      "percent": 100,
      "swapInfo": {
        "ammKey": "3a2ceHEsNjQCSXGfDzju8Xe8Aj86D8DGAHK4tuNRYRHT",
        "inAmount": "690257",
        "inputMint": "USD1ttGY1N17NEEHLmELoaybftRBUSErhqYiQzvEmuB",
        "label": "Manifest",
        "outAmount": "690083",
        "outputMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
      }
    }
  ],
  "setupInstructions": [
    {
      "accounts": [
        {
          "isSigner": true,
          "isWritable": true,
          "pubkey": "GkwFnmMDvn3HGMpJpWBg8tgJxr3NxNvg3AXxvXVPbRGJ"
        },
        {
          "isSigner": false,
          "isWritable": true,
          "pubkey": "GSFbPvFTbfcRNGs4EEZVF8tBjV6ChcTaBrTYGGsDAq8o"
        },
        {
          "isSigner": false,
          "isWritable": false,
          "pubkey": "GkwFnmMDvn3HGMpJpWBg8tgJxr3NxNvg3AXxvXVPbRGJ"
        }
      ],
      "data": "AQ==",
      "programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
    },
    {
      "accounts": [
        {
          "isSigner": true,
          "isWritable": true,
          "pubkey": "GkwFnmMDvn3HGMpJpWBg8tgJxr3NxNvg3AXxvXVPbRGJ"
        },
        {
          "isSigner": false,
          "isWritable": true,
          "pubkey": "GSFbPvFTbfcRNGs4EEZVF8tBjV6ChcTaBrTYGGsDAq8o"
        }
      ],
      "data": "AgAAAICWmAAAAAAA",
      "programId": "11111111111111111111111111111111"
    },
    {
      "accounts": [
        {
          "isSigner": false,
          "isWritable": true,
          "pubkey": "GSFbPvFTbfcRNGs4EEZVF8tBjV6ChcTaBrTYGGsDAq8o"
        }
      ],
      "data": "EQ==",
      "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
    }
  ],
  "slippageBps": 50,
  "swapInstruction": {
    "accounts": [
      {
        "isSigner": true,
        "isWritable": false,
        "pubkey": "GkwFnmMDvn3HGMpJpWBg8tgJxr3NxNvg3AXxvXVPbRGJ"
      },
      {
        "isSigner": false,
        "isWritable": true,
        "pubkey": "GSFbPvFTbfcRNGs4EEZVF8tBjV6ChcTaBrTYGGsDAq8o"
      },
      {
        "isSigner": false,
        "isWritable": true,
        "pubkey": "GWWjoZ2bZikAhhMAH5V3Mp6goHqnWAT6KqCZSHmqtoZ"
      }
    ],
    "data": "u2T6zDHErxSAlpgAAAAAAKjyDgAAAAAAMgAAAAAABAAAAC8BAJYLAAScehsAAnQBECcCA5wQJwME",
    "programId": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"
  },
  "swapMode": "ExactIn",
  "tipInstruction": null,
  "transactionVersion": 0
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- jupiter: https://openany.si/market/apis/jupiter/jupiter-swap-api-v2-prepare-unsigned-build-transaction/?offering=f8f3266c-4527-4cac-92df-e5421335aad1

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
