NexFlow › Library › Embed widget vs API integration
Embed widget vs API integration: paste a frame, or build against the endpoints
If you want NexFlow's swap or risk read on your own page, there are two very different ways in. The embed is a finished surface you drop into an iframe: swap, badge, done. The API is raw material: JSON verdicts and signals you render however you like. One costs you an afternoon and gives you no control. The other costs you an engineer and gives you all of it.
What the embed gives you
The embed generates an iframe snippet. You pick the shell — a Solana swap at 560px tall or an EVM swap at 660px, both capped at 520px wide — optionally pin a token so the widget opens on it, set a referral wallet so trades routed through your page credit you, and pick a theme. Paste the snippet, and your visitors get the same swap surface NexFlow runs: Jupiter routing on Solana, KyberSwap on EVM, with the token-check and fee behaviour identical to the main app because it is the main app, framed. The badge variant does the same for a risk grade: a small rendered element that shows a token's current Safety Read on your page.
What you do not get is control. The layout is the layout. The copy is the copy. If NexFlow changes the surface, your page changes with it. You cannot intercept the quote, add your own logic, or store anything about what happened. That is a feature for most sites and a wall for some.
What the API gives you
The API is the other end of the spectrum. The graded token verdict lives at /api/v1/token-risk: POST a query or GET by chain and address, and you get JSON back — score, grade, tier, the knowns and unknowns that produced it, and the underlying signals such as authority state and Token-2022 extensions. There is a free keyless tier rate-limited per IP; paid keys bought with SOL raise the limits and unlock batch access and the full pre-graduation signal set; and an x402 lane lets a machine pay per call in USDC with no key at all. The docs carry the full route list and the current price table.
What you do not get is a user interface. The API returns facts; rendering, caching, error handling, refreshing a stale grade, and explaining to your users what a "B" means are your problems. That is the trade.
Side by side, with sources
Rows are read from the feature pages and the public API docs named in the source column on the date shown. The SOL-denominated prices are the docs' own published table; the docs note they may be adjusted as the SOL price moves and that GET /v1/health carries the current table.
| Dimension | Embed widget | API integration | As of · source |
|---|---|---|---|
| What you ship | An iframe snippet (swap) or a badge element | Your own UI over JSON responses | as of 2026-09-27 · /features/embed/ and /features/api/ |
| Setup effort | Configure, copy, paste | Write and host code that calls, caches and renders | as of 2026-09-27 · both feature pages |
| Swap shell size | Solana 560px tall, EVM 660px tall, max width 520px | Not applicable | as of 2026-09-27 · /features/embed/ |
| Configuration surface | Token pin, referral wallet, theme | Any — you own the presentation | as of 2026-09-27 · /features/embed/ |
| Routing under the hood | Jupiter (Solana), KyberSwap (EVM) | Not a swap product — risk data endpoints | as of 2026-09-27 · /features/embed/ and /features/api/ |
| Key required | None | None on free tier (100/day per IP); vx_ key for paid tiers; none on x402 | as of 2026-09-27 · /docs/api/ |
| Published paid tiers | Not applicable | Builder 0.15 SOL/week (10,000/week) · Pro 0.5 SOL/month (60,000/month, batch) · Scale 1.5 SOL/year (750,000/year, batch) | as of 2026-09-27 · /docs/api/ |
| Machine-payable lane | Not applicable | x402: $0.01/call USDC; batch $0.08 flat up to 10 | as of 2026-09-27 · /docs/api/ |
| Revenue share | Referral wallet on routed trades | not published | as of 2026-09-27 · /features/embed/ |
| Who maintains it | NexFlow — the frame updates itself | You — against a versioned /v1 surface | as of 2026-09-27 · both feature pages |
The control you gain is the maintenance you inherit
People underrate the embed because it feels like a shortcut. It is a shortcut, and shortcuts are what most integrations should be. A community site that wants a swap box, a token project that wants its grade on the homepage, a newsletter that wants a badge — none of these need to own the rendering, and every one of them would spend more time maintaining a custom integration than the integration is worth. The frame also inherits the app's own safeguards: the same token check, the same fee display, the same simulation on EVM. You cannot accidentally build a worse version of it.
People overrate the API for the same reason. "We'll just call the endpoint" turns into caching policy, stale-grade handling, rate-limit backoff, a UI for the unknowns list, and a decision about what to show when the verdict is graded: false. All of that is legitimate work if you need a custom surface — a trading bot's pre-trade check, a portfolio page that grades every holding, a Discord bot answering "is this safe?" — and it is dead weight if you just wanted a box on a page.
Ask one question: does your product need to do something with the result, or just show it? Show it: embed. Do something with it: API. There is no third answer, and mixing them up is how a weekend project becomes a maintenance burden.
Pricing shapes, not just prices
The embed has no published price to you as an integrator; the trade fees are the app's stated fees, charged to the person swapping, and your referral wallet earns from routed trades on terms the referral surface sets. The API is a metered product with three published shapes: a free tier bounded per IP, keyed tiers bounded per period and priced in SOL, and a per-call x402 lane priced in USDC. Which shape fits depends on whether your calls are steady (a key) or bursty and unattended (x402), and whether a human is around to hold a key at all. If the caller is an agent, the x402 lane exists precisely so nobody has to.
Who should pick the embed
Pick the embed if you want a swap or a badge on a page and you do not want to own it. That is community sites, project homepages, documentation pages, creator pages with a referral wallet, and anyone whose engineering budget for this is measured in minutes. It suits teams who would rather the surface stay in sync with the app automatically than control every pixel, and it suits any case where the visitor is a human clicking a button.
Who should pick the API
Pick the API if the consumer of the result is code. Trading bots gating entries on the grade, wallet dashboards scoring holdings, alerting systems, research pipelines, and AI agents that need a verdict mid-task. Start on the free keyless tier to learn the response shape, move to a vx_ key when you need batch or volume, and use the x402 lane when the caller cannot hold a key. Read the integrate page for the route map, and treat the docs as the source of truth on prices — the table above is dated for a reason.
Frequently asked
What is the difference between the NexFlow embed and the API?
The embed is a finished surface — an iframe swap shell or a risk badge — you paste into a page; NexFlow renders and maintains it. The API is JSON: graded token-risk verdicts and signals at /api/v1/token-risk that you call and render yourself. Embed if you need to show a result, API if your code needs to act on one.
How big is the embedded swap widget?
As of 2026-09-27 the embed feature page states a Solana shell of 560px height, an EVM shell of 660px height, and a maximum width of 520px. You can pin a token, set a referral wallet and choose a theme.
Do I need an API key?
Not for the free tier, which the docs state is rate-limited to 100 requests per day per IP. Paid vx_ keys (Builder, Pro, Scale) raise the limits and unlock batch access; the x402 lane needs no key at all and is paid per call in USDC.
What do the paid API tiers cost?
Per the public docs as of 2026-09-27: Builder 0.15 SOL per week for 10,000 requests; Pro 0.5 SOL per month for 60,000 with batch; Scale 1.5 SOL per year for 750,000 with batch. The docs note prices may be adjusted as SOL moves and that GET /v1/health returns the current table.
Can an AI agent use the API without an account?
Yes. The x402 lane answers an unpaid call with an HTTP 402 offer; the client pays $0.01 in USDC (batch $0.08 flat, up to 10 items) and retries with the payment header. No key, no signup.