Paid developer plans (Free, Pro, Scale; names, prices and limits are set by the operator). **Off unless the operator runs the API with `PLANS_LIVE=1`**: until then every route in this group returns 404 and every account has the Free limits, which equal the limits without plans (120 requests/minute per key, no monthly quota, 10 webhook endpoints, 50 bps partner fee cap). With plans on, a live `lh_live_` key's account gets its plan's rate limit and monthly quota (`QUOTA_EXCEEDED` once used up; responses then carry `x-quota-limit` and `x-quota-remaining`), webhook endpoint count, partner fee cap and white-label. Plans are paid with LayerHop's own crypto subscriptions: each month an invoice in USDC, paid with any token on the hosted invoice page.
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Layerhop Com Plans API
version: 0.1.0
contact:
name: LayerHop
url: https://docs.layerhop.com
description: 'Operations tagged Plans across 2 of this provider''s published API definitions: layerhop-com-openapi.yaml, openapi.yaml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.layerhop.com
description: Hosted API (production)
- url: http://localhost:8787
description: Local API (`pnpm --filter @layerhop/api dev`)
security:
- {}
- ApiKey: []
tags:
- name: Plans
description: 'Paid developer plans (Free, Pro, Scale; names, prices and limits are set by the operator).
**Off unless the operator runs the API with `PLANS_LIVE=1`**: until then every route in this
group returns 404 and every account has the Free limits, which equal the limits without plans
(120 requests/minute per key, no monthly quota, 10 webhook endpoints, 50 bps partner fee cap).
With plans on, a live `lh_live_` key''s account gets its plan''s rate limit and monthly quota
(`QUOTA_EXCEEDED` once used up; responses then carry `x-quota-limit` and `x-quota-remaining`),
webhook endpoint count, partner fee cap and white-label. Plans are paid with LayerHop''s own
crypto subscriptions: each month an invoice in USDC, paid with any token on the hosted invoice page.'
paths:
/v1/plans:
get:
tags:
- Plans
operationId: listPlans
summary: List plans
description: The plan catalog with monthly prices (base units of the billing token, USDC). 404 unless plans are enabled.
security: []
responses:
'200':
description: Plans, in display order.
content:
application/json:
schema:
$ref: '#/components/schemas/PlanList'
example:
plans:
- id: free
name: Free
tagline: Everything you need to ship.
priceUsdc: '0'
price:
amount: '0'
symbol: USDC
decimals: 6
chainId: 8453
interval: month
rateLimitRpm: 120
webhookEndpoints: 10
maxPartnerFeeBps: 50
whiteLabel: false
prioritySupport: false
- id: pro
name: Pro
tagline: Higher limits and your own brand.
priceUsdc: '49'
price:
amount: '49000000'
symbol: USDC
decimals: 6
chainId: 8453
interval: month
rateLimitRpm: 600
monthlyRequests: 2000000
webhookEndpoints: 25
maxPartnerFeeBps: 100
whiteLabel: true
prioritySupport: false
'404':
$ref: '#/components/responses/NotFound'
servers:
- url: https://api.layerhop.com
description: Hosted API (production)
- url: http://localhost:8787
description: Local API (`pnpm --filter @layerhop/api dev`)
/v1/account/plan:
get:
tags:
- Plans
operationId: getAccountPlan
summary: Get your plan and usage
description: 'The plan of the API key''s account and this month''s live request count. Never counts against
the monthly quota, so it answers even after `QUOTA_EXCEEDED`. 404 unless plans are enabled.'
security:
- ApiKey: []
responses:
'200':
description: Plan and usage.
content:
application/json:
schema:
$ref: '#/components/schemas/AccountPlan'
example:
plan:
id: pro
name: Pro
tagline: Higher limits and your own brand.
priceUsdc: '49'
price:
amount: '49000000'
symbol: USDC
decimals: 6
chainId: 8453
interval: month
rateLimitRpm: 600
monthlyRequests: 2000000
webhookEndpoints: 25
maxPartnerFeeBps: 100
whiteLabel: true
prioritySupport: false
status: active
periodEnd: '2026-11-21T10:00:00.000Z'
expiresAt: '2026-12-01T10:00:00.000Z'
usage:
requests: 18234
monthlyRequests: 2000000
resetsAt: '2026-11-01T00:00:00.000Z'
rateLimitRpm: 600
webhookEndpoints:
used: 2
limit: 25
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
servers:
- url: https://api.layerhop.com
description: Hosted API (production)
- url: http://localhost:8787
description: Local API (`pnpm --filter @layerhop/api dev`)
/v1/embed/branding:
get:
tags:
- Plans
operationId: getEmbedBranding
summary: Check white-label for a partner
description: 'Whether the widget may hide "Routed by LayerHop" for `integrator`: true only when that
partner''s account is on a plan with white-label. The hosted widget asks this before honoring
`hidePoweredBy`, so the URL flag alone never removes the branding. Cached for 60 s. 404 unless plans are enabled.'
security: []
parameters:
- name: integrator
in: query
required: true
description: Partner id ([a-z0-9-]{1,32}).
schema:
type: string
responses:
'200':
description: Entitlement.
content:
application/json:
schema:
$ref: '#/components/schemas/EmbedBranding'
example:
integrator: acme
whiteLabel: true
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
servers:
- url: https://api.layerhop.com
description: Hosted API (production)
- url: http://localhost:8787
description: Local API (`pnpm --filter @layerhop/api dev`)
components:
schemas:
EmbedBranding:
type: object
required:
- integrator
- whiteLabel
properties:
integrator:
type: string
whiteLabel:
type: boolean
PlanList:
type: object
required:
- plans
properties:
plans:
type: array
items:
$ref: '#/components/schemas/Plan'
AccountPlan:
type: object
required:
- plan
- status
- periodEnd
- expiresAt
- usage
properties:
plan:
$ref: '#/components/schemas/Plan'
status:
$ref: '#/components/schemas/PlanStatus'
periodEnd:
type:
- string
- 'null'
format: date-time
description: End of the paid period.
expiresAt:
type:
- string
- 'null'
format: date-time
description: When the plan falls back to Free unless renewed (period end + grace).
usage:
$ref: '#/components/schemas/PlanUsage'
PlanStatus:
type: string
enum:
- free
- active
- past_due
- canceling
- grace
description: '`free`; `active` (paid, renewing); `past_due` (the renewal invoice is overdue); `canceling`
(paid until `periodEnd`, not renewing); `grace` (period over, renewal unpaid: the plan stays until `expiresAt`).
'
Error:
type: object
description: Every non-2xx response has this body.
required:
- error
properties:
error:
type: object
required:
- code
- message
- requestId
- docsUrl
properties:
code:
$ref: '#/components/schemas/ErrorCode'
message:
type: string
description: Human-readable detail. Do not parse it.
requestId:
type: string
format: uuid
description: Same value as the `x-request-id` header.
docsUrl:
type: string
format: uri
description: Error catalog page, `https://docs.layerhop.com/errors/{code}`.
details:
type: object
description: 'Extra structured data, only on some errors. `NO_ROUTE` (and `AMOUNT_TOO_SMALL` /
`AMOUNT_TOO_LARGE` decided from the providers'' answers) on a quote carry `errors`: why
each provider returned no quote, the same entries a successful response lists in `errors`.
`AMOUNT_TOO_SMALL` on a quote may also carry the route''s minimum (D-036): `minAmount`,
`minAmountUsd`, `minAmountApprox`. `NO_ROUTE` on a live quote (and `UNSUPPORTED_CHAIN`
into a route-restricted chain such as Blast) may carry `suggestions` (D-053).
'
properties:
errors:
type: array
items:
$ref: '#/components/schemas/ProviderError'
suggestions:
type: array
maxItems: 4
description: '`NO_ROUTE` / `UNSUPPORTED_CHAIN` on a live quote: alternatives that quoted, best first (D-053).'
items:
$ref: '#/components/schemas/RouteSuggestion'
minAmount:
type: string
pattern: ^\d+$
description: '`AMOUNT_TOO_SMALL`: smallest input known to quote on this route, base units of `srcToken`.'
minAmountUsd:
type: number
description: '`AMOUNT_TOO_SMALL`: `minAmount` in USD, when the token has a price.'
minAmountApprox:
type: boolean
description: '`AMOUNT_TOO_SMALL`: `true` when `minAmount` was found by probing larger amounts ($10 / $25 / $50), so the true minimum is at most this; `false` when a provider reported it.'
ErrorCode:
type: string
description: Stable error code. Each has a page at `https://docs.layerhop.com/errors/{code}`.
enum:
- INVALID_PARAMS
- UNSUPPORTED_CHAIN
- UNSUPPORTED_TOKEN
- AMOUNT_TOO_SMALL
- AMOUNT_TOO_LARGE
- CALLS_REVERTED
- LAUNCH_IMAGE_INVALID
- NO_ROUTE
- ROUTE_EXCLUDED
- QUOTE_NOT_FOUND
- QUOTE_EXPIRED
- ORDER_NOT_FOUND
- PROVIDER_ERROR
- PROVIDER_TIMEOUT
- RATE_LIMITED
- QUOTA_EXCEEDED
- UNAUTHORIZED
- FORBIDDEN
- ADDRESS_SANCTIONED
- NOT_FOUND
- CONFLICT
- GASLESS_PENDING
- GASLESS_FAILED
- MARKET_UNAVAILABLE
- LIMIT_ORDER_REJECTED
- INTERNAL
ProviderError:
type: object
description: A provider that failed while the request as a whole succeeded.
required:
- provider
- code
- message
properties:
provider:
$ref: '#/components/schemas/ProviderId'
code:
$ref: '#/components/schemas/ErrorCode'
message:
type: string
PlanUsage:
type: object
required:
- requests
- monthlyRequests
- resetsAt
- rateLimitRpm
- webhookEndpoints
properties:
requests:
type: integer
description: Live API requests this calendar month (UTC).
monthlyRequests:
type:
- integer
- 'null'
resetsAt:
type: string
format: date-time
rateLimitRpm:
type: integer
webhookEndpoints:
type: object
required:
- used
- limit
properties:
used:
type: integer
limit:
type: integer
marketCalls:
type: object
description: Market data calls this calendar month (UTC). Present only while the market data API is enabled.
required:
- used
- limit
- rateLimitRpm
properties:
used:
type: integer
limit:
type:
- integer
- 'null'
rateLimitRpm:
type: integer
RouteSuggestion:
description: 'An alternative to a route that returned no quote (D-053). `dst_token`: same payment, another
destination token. `src_token`: same destination token, paid with another source token worth the
same. `via_hub`: two signed steps through `hub` (`steps[0]` then `steps[1]`, each its own quote,
order and signature); the top-level fields describe the whole trip.
'
allOf:
- $ref: '#/components/schemas/RouteLeg'
- type: object
required:
- kind
- message
properties:
kind:
type: string
enum:
- dst_token
- src_token
- via_hub
message:
type: string
description: Short text for a button, e.g. "Receive USDC on Ethereum instead".
symbol:
type: string
description: 'The token that changed: the new source or destination token, or the hub token.'
hub:
type: object
description: '`via_hub` only: the token between the two steps.'
required:
- chainId
- token
- symbol
- decimals
properties:
chainId:
type: integer
token:
type: string
symbol:
type: string
decimals:
type: integer
steps:
type: array
description: '`via_hub` only: the two legs in order.'
minItems: 2
maxItems: 2
items:
$ref: '#/components/schemas/RouteLeg'
ProviderId:
type: string
description: 'Liquidity provider. Loaded by default: `jupiter`, `relay`, `debridge`, `zerox`, `kyberswap`, `lifi`, `mayan`,
`blast-native` (Blast''s canonical bridge: ETH on Ethereum → ETH on Blast only, no LayerHop fee).
`across` (Across Protocol, cross-chain EVM ↔ EVM), `baltex` (Baltex exchanges and DEX swaps), `routefun`
(Route, same-chain), `bebop` (Bebop RFQ and Aggregation, same-chain), `near-intents` (NEAR Intents 1Click),
`thorchain` and `chainflip` (native BTC and other non-EVM routes) `layerhop-solver` (LayerHop''s own solver: USDC between Base,
Arbitrum and OP Mainnet, filled from our inventory) and `layerhop-router` (LayerHop''s own same-chain
router on Robinhood Chain and Berachain) are built but not loaded by default.
`odos` is shut down; `mock` exists only in local
development (`LAYERHOP_ENABLE_MOCK=1`). `sandbox` serves every request made with an `lh_test_` key.
`direct` is a plain token transfer, used by checkout when the payer already holds the settlement token.
'
enum:
- jupiter
- relay
- debridge
- mayan
- zerox
- kyberswap
- odos
- lifi
- blast-native
- across
- baltex
- routefun
- bebop
- near-intents
- thorchain
- chainflip
- layerhop-router
- layerhop-solver
- mock
- sandbox
- direct
Plan:
type: object
required:
- id
- name
- tagline
- priceUsdc
- price
- rateLimitRpm
- monthlyRequests
- webhookEndpoints
- maxPartnerFeeBps
- whiteLabel
- prioritySupport
properties:
id:
type: string
description: Stable plan id (`free`, `pro`, `scale`).
name:
type: string
tagline:
type: string
priceUsdc:
type: string
description: Monthly price as a decimal string ("49").
price:
type: object
required:
- amount
- symbol
- decimals
- chainId
- interval
properties:
amount:
type: string
pattern: ^\d+$
description: Monthly price in base units of the billing token.
symbol:
type: string
decimals:
type: integer
chainId:
type: integer
description: Chain the invoices settle on.
interval:
type: string
const: month
rateLimitRpm:
type: integer
description: Requests per minute per API key (a higher limit set on the key wins).
monthlyRequests:
type:
- integer
- 'null'
description: Live requests per account per calendar month (UTC); null = no quota.
webhookEndpoints:
type: integer
maxPartnerFeeBps:
type: integer
description: Highest partner fee the account's partner profile may charge.
whiteLabel:
type: boolean
description: Hide LayerHop branding in the widget and on hosted checkout.
prioritySupport:
type: boolean
marketRpm:
type: integer
description: Market data requests per minute per API key (0 = no market data). Present only while the market data API is enabled.
marketMonthlyCalls:
type:
- integer
- 'null'
description: Market data calls per account per calendar month (UTC), live and test keys together; null = no cap. Present only while the market data API is enabled.
RouteLeg:
type: object
description: One quotable leg, in the same terms as a quote request. Amounts are base units.
required:
- srcChain
- srcToken
- amount
- dstChain
- dstToken
properties:
srcChain:
type: integer
description: Source chain id.
srcToken:
type: string
description: 'Source token address or mint (native coin: the zero address; SOL: the system program id).'
amount:
type: string
pattern: ^\d+$
description: Input in base units of `srcToken`.
dstChain:
type: integer
description: Destination chain id.
dstToken:
type: string
dstAmount:
type: string
pattern: ^\d+$
description: Estimated output in base units of `dstToken` (from the check quote; scaled when served from cache).
responses:
NotFound:
description: The resource does not exist or belongs to another account (`NOT_FOUND`).
headers:
x-request-id:
$ref: '#/components/headers/RequestId'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: NOT_FOUND
message: API key not found
requestId: 0d5e1f6a-3b2c-4d1e-8f9a-7b6c5d4e3f21
docsUrl: https://docs.layerhop.com/errors/NOT_FOUND
BadRequest:
description: 'Invalid request (`INVALID_PARAMS`, `UNSUPPORTED_CHAIN`, `UNSUPPORTED_TOKEN`,
`AMOUNT_TOO_SMALL`, `AMOUNT_TOO_LARGE`).
'
headers:
x-request-id:
$ref: '#/components/headers/RequestId'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: INVALID_PARAMS
message: 'amount: amount must be an integer string in base units'
requestId: 0d5e1f6a-3b2c-4d1e-8f9a-7b6c5d4e3f21
docsUrl: https://docs.layerhop.com/errors/INVALID_PARAMS
Unauthorized:
description: Missing or wrong credentials (`UNAUTHORIZED`).
headers:
x-request-id:
$ref: '#/components/headers/RequestId'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error:
code: UNAUTHORIZED
message: Invalid admin token
requestId: 0d5e1f6a-3b2c-4d1e-8f9a-7b6c5d4e3f21
docsUrl: https://docs.layerhop.com/errors/UNAUTHORIZED
headers:
RequestId:
description: Unique id for this request. Quote it when you report a problem.
schema:
type: string
format: uuid
securitySchemes:
ApiKey:
type: apiKey
in: header
name: x-api-key
description: 'Optional. An `lh_live_…` key from the dashboard attributes requests and orders to your account
and raises your rate limit (per key, default 120 requests/minute; without a key the limit is
per IP). An invalid or revoked key is rejected with `UNAUTHORIZED`. If your account has an
active partner profile, the key selects your partner fee and allows `integratorFeeBps`.
An `lh_test_…` key switches every request to **test mode**: quotes come from the `sandbox`
provider (priced from live USD prices), built transactions are placeholders that move no funds
(`tx.sandbox: true`), and reported orders run a simulated lifecycle (pending, then filled in about
10 seconds) with webhooks sent to your test endpoints only. Amounts ending in `4001` refund,
`4002` fail and `4004` return `NO_ROUTE`. Test and live data never mix: a quote, order or
webhook of one mode is invisible to the other.
'
Session:
type: apiKey
in: cookie
name: lh_session
description: 'Dashboard session cookie set by `POST /v1/auth/verify` (HttpOnly, Secure, SameSite=Lax,
7 days). Auth and Dashboard routes only.
'
AdminBearer:
type: http
scheme: bearer
description: Operator `ADMIN_TOKEN`. Admin routes only.
AdminSession:
type: apiKey
in: cookie
name: lh_admin
description: Owner sign-in cookie set by `POST /v1/admin/login` (12 hours). Admin routes only.
x-refined-from:
- layerhop-com-openapi.yaml
- openapi.yaml