# SENTO API reference

The public transaction-builder contract: requests, responses and execution boundaries.

Contract reference: public integration guide, 2026-11-24. Query the live quote catalogue before launching.

All paths below are relative to the production base URL. Every request requires `chain: base`; no API key or login is required. This reference follows the public integration guide updated November 24, 2026.

**Production base URL**

```
https://sento.fun/sento-api/pub-api
```

## Endpoints

| Method and path | Purpose |
| --- | --- |
| `POST /token/create` | [Build a launch](https://sento.fun/docs/api-reference#create). |
| `POST /token/buy` | [Buy by quote spend](https://sento.fun/docs/api-reference#buy). |
| `POST /token/buy_exact` | [Buy a target token amount](https://sento.fun/docs/api-reference#buy-exact). |
| `POST /token/sell` | [Sell project tokens](https://sento.fun/docs/api-reference#sell). |
| `GET /token/info` | [Read token details](https://sento.fun/docs/api-reference#info). |
| `GET /token/price` | [Estimate a trade](https://sento.fun/docs/api-reference#price). |
| `GET /chains/quotes` | [Read the quote catalogue](https://sento.fun/docs/api-reference#quotes). |
| `GET /quote/check` | [Check creation availability](https://sento.fun/docs/api-reference#quote-check). |

## Conventions

- GET parameters belong in the query; POST parameters belong in a JSON body. Pass `chain=base` explicitly. Fields use lowercase snake_case.
- Success is `{"code":0,"msg":"ok","data":{...}}`; failures return a nonzero business `code` and `data:null`. Check HTTP status and `code`, plus endpoint-specific errors. `msg` is not a stable program interface.
- Amount inputs are human-readable decimal strings, not wei. Use quote-specific decimals from the live catalogue and returned `quote_decimals`; project-token amounts use 18 decimals. Extra precision is truncated. Returned transaction `value` is a wei integer string. Never convert amounts through floating point.
- Addresses are `0x` plus 40 hexadecimal characters. Empty quote address or the zero address means native ETH. The public JSON body limit is 1 MiB; oversized chunked bodies may return `400` rather than `413`.
- Buy and sell for a multi-quote token always settle in its first quote asset. Read the ordered pool list from `/token/info`; another settlement quote cannot be selected.

## Transaction responses and approvals

Create, buy and sell return an unsigned transaction inside the response's `data` object. The request's `creator` or trade `to` is the signing wallet; the response's `to` is the target contract.

| Response data field | Meaning |
| --- | --- |
| `chain_id` | Chain to use when signing. |
| `to` / `data` | Target contract and unsigned calldata. These are inside the response's `data` object. |
| `value` | Exact native value to send, as a wei integer string. Gas is additional. |
| `gas_limit` | Estimated gas limit as a string; may be absent. |
| `gas_unavailable_reason` | `pending_approval` means confirm approval, then request fresh transaction data so gas can be estimated. |
| `approvals[]` | Required ERC-20 approvals. Native-quoted creation and buys need no quote-token approval; selling can still require project-token approval. |

| approvals[] field | Meaning |
| --- | --- |
| `token` | Send this approval transaction to this ERC-20 address. |
| `spender` | The contract receiving allowance. Do not use this as the approval transaction target. |
| `amount` | Required allowance in human-readable token units; the pool route uses the string `"max"`. |
| `data` | Approval calldata to send unchanged to `token`. |
| `need_approve` | If true, confirm this approval before the main transaction. If false, skip it. |

Submit required approvals in array order and wait for successful receipts. Use the final transaction's exact `chain_id`, `to`, `data` and `value`; gas is additional. If gas is unavailable because approval is pending, confirm approval and rebuild. Do not cache expired calldata or treat a predicted address as proof of execution.

## POST /token/create

Build a token launch for `creator`, the wallet that signs and broadcasts. Required fields and mechanism settings follow below. A public-channel launch must include an opening buy worth at least $1, including fees. Omission is treated as zero and rejected.

The response includes the [shared transaction fields](https://sento.fun/docs/api-reference#transaction-response) and these launch fields:

| Response data field | Meaning |
| --- | --- |
| `predicted_token` | Predicted token address; verify a successful receipt and then query `/token/info`. |
| `metadata_uri` | Published metadata URI. |
| `price_proof_expires_at` | Optional Unix seconds. When present, execution must land onchain before it expires; rebuild if approvals leave too little time. |
| `quotes[]` | `quote`, `quote_decimals`, `weight_bps`, `price_usd`, `signed`, `raise_target`, `dev_buy`, `min_token_out`; single-quote opening buys also return `dev_buy_token_out` and `dev_buy_supply_percent`. |
| `raise_usd` | Raise target in USD. |
| `graduation_fdv_usd` | Graduation FDV in USD; single quote only. |
| `template_id` | Selected template, echoed back. |
| `buy_fee_bps` / `sell_fee_bps` | Total buy and sell fees, including token tax. |

This channel accepts an optional hosted `image_uri`; no file-upload or Base64 endpoint is defined by this public contract. See [Agent image input](https://sento.fun/docs/agentic-api#image-input) for handling an attachment without inventing a URI.

## Create request

| Field | Rule |
| --- | --- |
| `chain` | Required. `base` (Base mainnet, chain ID `8453`). |
| `creator` | Required. The EVM wallet that signs the approvals and launch. |
| `name` / `symbol` | Required. Name ≤64 bytes. Symbol 2–10 Chinese characters, A–Z, a–z or digits; no spaces. |
| `template_id` | Pass explicitly: Classic `1`, Staking `5`, Tax `6`. `0` is invalid. |
| `quotes[].quote` | Required. Catalogue address; `""` or `0x0000000000000000000000000000000000000000` means native ETH. |
| `quotes[].weight_bps` | Required. Sum to `10000`; use `10000` for a single quote. Each quote must be usable; multi-quote shares must also meet contract minimums. |
| Opening buy | Required: `quotes[].dev_buy` in quote units, or `quotes[].dev_buy_percent` (`"5"` = 5% of supply, single quote only). Decimal strings; mutually exclusive. Value must be ≥$1. |
| `quotes[].min_token_out` | Optional opening-buy floor, in human-readable project tokens (18 decimals); requires an opening buy. |
| `deadline` | Optional future Unix timestamp in seconds; `0` means unset. |

Optional metadata: `image_uri` (`ipfs://`, `https://` or `ar://`, ≤512 bytes), `description` (≤1000 bytes), `website` (`https://`), `twitter` (`https://x.com/...` or `https://twitter.com/...`) and `telegram` (`https://t.me/...` or `https://telegram.me/...`). X/Twitter also accepts `www.` and `mobile.` subdomains. Empty website defaults to `https://sento.fun`; empty description uses the platform default.

> **Amounts stay as strings:** Input amounts are human-readable decimal strings, not wei. Read quote decimals from the catalogue and `data.quotes[].quote_decimals`; RWA precision varies. Extra fractional digits are truncated. Transaction `data.value` is different: it is an integer string in wei.

## Choose a mechanism

| Mechanism | template_id | Configuration |
| --- | --- | --- |
| Classic (API: Standard) | `1` | Omit `tax`. |
| Staking | `5` | Omit both `tax` and `creator_recipients`. |
| Tax | `6` | `tax.buy_bps` and `tax.sell_bps`: `100`, `200`, `300`, `400` or `500` (1–5%). `tax.dividend_bps`: `0`–`10000`; choose a payout mode below. |

Optional `creator_recipients`: `[{"address":"<EVM_ADDRESS>","bps":10000}]`, up to **5** recipients, shares totaling `10000`. Omit to send the creator share to `creator`; not allowed for Staking. For Tax, these shares split only the non-dividend remainder.

## Tax payout modes

| Destination | tax.dividend_bps | creator_recipients |
| --- | --- | --- |
| Holder dividends | `10000` | Not needed. The entire creator share goes to holders. |
| Specified addresses | Omit or `0` | Optional. If omitted, the creator share goes to `creator`. |
| Split | `1`–`9999` | Optional. Address shares total `10000` and split only the non-dividend remainder. If omitted, that remainder goes to `creator`. |

`dividend_bps` is the holders' portion of the **creator share**, not the trade amount. `5000` means 50% to holders; recipient shares split the other 50%. Values outside `0`–`10000` are rejected.

The example sets 1% token tax on buys and sells. Use the user's requested tax rates; example values are not API defaults.

**Tax create body · 1% token tax, holder dividends**

```
{
  "chain": "base",
  "creator": "<YOUR_SIGNING_WALLET_ADDRESS>",
  "name": "Orbit",
  "symbol": "ORBIT",
  "template_id": 6,
  "tax": { "buy_bps": 100, "sell_bps": 100, "dividend_bps": 10000 },
  "quotes": [
    { "quote": "", "weight_bps": 10000, "dev_buy": "0.01" }
  ]
}
```

## Tax and platform fees

| Tax example · each buy or sell | Rate |
| --- | --- |
| Token tax · `tax.buy_bps` / `tax.sell_bps` | `100` bps = 1% |
| Platform fee · separate from token tax | `100` bps = 1% |
| Total · `data.buy_fee_bps` / `data.sell_fee_bps` | `200` bps = 2% |

For Tax tokens, total fee = **1% platform fee + the selected token tax**, independently on buys and sells. A request for 1% tax with `buy_fee_bps=200` and `sell_fee_bps=200` is expected, not a mismatch requiring another confirmation. The platform portion is not a holder dividend.

The opening `dev_buy` already includes trading fees. Send the exact returned wei `data.value`; do not add the platform fee or tax again. Network gas is additional. The returned fee fields are totals, not extra fees to add to the tax.

## POST /token/buy

Specify quote spend. This endpoint supports both the curve and pool routes; [pool execution](https://sento.fun/docs/api-reference#pool-route) has additional restrictions.

| JSON body field | Rule |
| --- | --- |
| `chain` | Required. `base`. |
| `token` | Required. Project-token address. |
| `to` | Required. The wallet that signs, pays and receives the output; allowance is checked against this wallet. |
| `slippage` | Optional number in `[0, 100)`, in percent: `1` means 1%. Omitted means **0**, with no tolerance. An explicit minimum output or maximum input overrides it. |
| `extra_fee_bps` | Optional integrator fee, at most `500` bps. Must be `0` on the pool route. |
| `extra_fee_receiver` | Required when `extra_fee_bps` is nonzero. |
| `deadline` | Optional Unix seconds; omission uses chain time +20 minutes. A past trade deadline can still return calldata and will revert onchain. |
| `amount_in` | Required positive decimal string in quote units. |
| `min_token_out` | Optional minimum project tokens, in human-readable 18-decimal units. When supplied, `slippage` is ignored. |

Response: [shared transaction fields](https://sento.fun/docs/api-reference#transaction-response), `estimated_token_out`, and the trade fields below. Here `min_out` is the minimum tokens received.

| Response data field | Meaning |
| --- | --- |
| `quote` / `quote_decimals` | Settlement asset and its decimals. |
| `fee` | Fee in human-readable quote units. |
| `min_out` | Execution bound; its meaning depends on the endpoint. Slippage and applicable integrator fees are already accounted for; do not deduct them again. |
| `route` | `core` for the bonding curve or `pool` after graduation. Omission means `core`. |
| `clamped` | True when remaining bonding-curve capacity allows only a partial fill. |
| `actual_token_out` / `actual_amount_in` / `refund` | When clamped, actual tokens received, quote spent and quote refunded. |
| `will_trigger_migration` | Whether the buy will graduate the bonding curve and migrate it. |

## POST /token/buy_exact

Specify a target project-token amount instead of quote spend. This endpoint is supported on the bonding curve only; `route=pool` returns `400` for `exact_token_out`.

| JSON body field | Rule |
| --- | --- |
| `chain` | Required. `base`. |
| `token` | Required. Project-token address. |
| `to` | Required. The wallet that signs, pays and receives the output; allowance is checked against this wallet. |
| `slippage` | Optional number in `[0, 100)`, in percent: `1` means 1%. Omitted means **0**, with no tolerance. An explicit minimum output or maximum input overrides it. |
| `extra_fee_bps` | Optional integrator fee, at most `500` bps. Must be `0` on the pool route. |
| `extra_fee_receiver` | Required when `extra_fee_bps` is nonzero. |
| `deadline` | Optional Unix seconds; omission uses chain time +20 minutes. A past trade deadline can still return calldata and will revert onchain. |
| `exact_token_out` | Required positive decimal string in project-token units (18 decimals). Use this instead of `amount_in`. |
| `max_amount_in` | Optional quote-spend cap. When supplied, `slippage` is ignored. Otherwise slippage is added to the estimated spend to set the cap. |

Response fields follow [buy](https://sento.fun/docs/api-reference#buy), with `estimated_amount_in` for estimated quote spend. Here `min_out` means the **spend cap**, and `actual_token_out` is the amount actually received. Do not interpret `min_out` as tokens on this endpoint.

## POST /token/sell

Sell project tokens into the token's settlement quote. The response may require approval of the project token before execution.

| JSON body field | Rule |
| --- | --- |
| `chain` | Required. `base`. |
| `token` | Required. Project-token address. |
| `to` | Required. The wallet that signs, pays and receives the output; allowance is checked against this wallet. |
| `slippage` | Optional number in `[0, 100)`, in percent: `1` means 1%. Omitted means **0**, with no tolerance. An explicit minimum output or maximum input overrides it. |
| `extra_fee_bps` | Optional integrator fee, at most `500` bps. Must be `0` on the pool route. |
| `extra_fee_receiver` | Required when `extra_fee_bps` is nonzero. |
| `deadline` | Optional Unix seconds; omission uses chain time +20 minutes. A past trade deadline can still return calldata and will revert onchain. |
| `token_in` | Required positive decimal string in project-token units (18 decimals). |
| `min_quote_out` | Optional minimum quote received, in quote units. When supplied, `slippage` is ignored. |

Response fields follow [buy](https://sento.fun/docs/api-reference#buy), with `estimated_quote_out` for expected quote received; `min_out` is the minimum quote received. Confirm the token approval first. [Pool-route rules](https://sento.fun/docs/api-reference#pool-route) also apply after graduation.

## Trading after graduation

- Buy and sell automatically use `route=pool` after graduation. Only buy by spend and sell are supported; `/token/buy_exact` is rejected.
- `extra_fee_bps` must be `0`. An integration cannot keep adding this fee to pool-route trades.
- The pool route returns **two approvals in order**. Send each required item's `data` to its own `token`, confirming it before proceeding. `spender` differs from the main transaction's `to`, and approval `amount` is `"max"`. Do not collapse these into one approval or substitute a guessed spender.

## GET /token/info

Required query: `chain=base&token=<address>`. Returns `data.engine=v3`, echoed `chain` and `token`, and a `v3` details object. A token outside v3 on this chain returns HTTP `404`, business `code=4004`.

| data.v3 field | Meaning |
| --- | --- |
| Identity | `name`, `symbol`, `description`, `image_url`, `twitter`, `telegram`, `website`, `creator`. |
| `stage` / `tradable` / `trade_route` | Lifecycle, current API tradability and route (`core` or `pool`). Read `not_tradable_reason` when tradable is false. |
| `pools[]` | Ordered quotes: `quote`, `quote_decimals`, `weight_bps`, `pool_id`, `has_curve`, `raise_target`. The first quote settles buys and sells. |
| `snapshot` | Creation snapshot including `template_id`, `buy_fee_bps`, `sell_fee_bps`, `buy_tax_bps`, `sell_tax_bps`, `recipients[]`, `raise_usd`, `graduation_fdv_usd`, `created_at`. |
| `market` | `price_usd`, `market_cap_usd`, `volume_24h_usd`, `price_change_24h`, `total_supply`; `unavailable_reason` explains unavailable market data. |

## GET /token/price

Estimate only; this endpoint returns no transaction calldata.

| Query parameter | Rule |
| --- | --- |
| `chain` / `token` | Required. `base` and the project-token address. |
| `side` | Required. `buy` or `sell`. |
| `mode` | Required. `exact_in` or `exact_out`; sell supports only `exact_in`. |
| `amount` | Required decimal string. Buy/exact_in uses quote units; buy/exact_out and sell/exact_in use project-token units. |

Response data: `chain`, `token`, `side`, `mode`, `quote`, `quote_decimals`, `route`, `amount_in`, `amount_out`, `fee`, `fee_bps`, `clamped`, `actual_amount_out`, `refund`, `will_trigger_migration`.

> **Check errors inside a successful response:** On the curve, HTTP 200 can contain `data.error_code=amount_too_small`. For buy/exact_out, this also represents other estimate failures, including insufficient remaining supply or a chain-read failure, and may include `min_amount_out`. Do not assume increasing the amount fixes it. On the pool route this error field is not used; an invalid amount returns `400`.

## GET /chains/quotes

| Query parameter | Rule |
| --- | --- |
| `chain` | Required. `base`. |
| `keyword` | Optional case-insensitive symbol substring or `0x` address prefix. |
| `category` | Optional: `base`, `rwa`, `meme`, `defi`, `customize`. Other values return `400`. |

Returns `data.chain` and `data.list[]`. Each list row contains `quote`, `symbol`, `decimals`, `category`, and optional `liquidity_status`. `insufficient` blocks new creation; existing tokens can still trade. No pagination parameter is defined.

Catalogue inclusion and missing liquidity warnings do not establish current launch eligibility. The catalogue does not return `usable`; call [quote check](https://sento.fun/docs/api-reference#quote-check) before a launch. Browse the [complete live catalogue](https://sento.fun/docs/api-quotes#all-quotes).

**Read all categories**

```
curl 'https://sento.fun/sento-api/pub-api/chains/quotes?chain=base'
```

## GET /quote/check

Required query: `chain=base`. Optional `quote=<address>`; omission means native ETH. Use `data.usable` to decide whether this quote can currently create a token.

| Response data field | Meaning |
| --- | --- |
| `usable` | Current creation eligibility. Recheck rather than relying on a stored catalogue snapshot. |
| `unusable_reason` | Examples: `not_supported`, `insufficient_liquidity`, `not_registered`, `disabled`, or a price-related reason. |
| `symbol` / `chain` / `quote` | Quote identity. |
| `onchain` | `registered`, `active`, `decimals`, `price_source_kinds[]`, `paused_kinds[]`, `onchain_price_usd`. |
| `price` | Platform `usd`, `updated_at`, `stale`. |
| `application` / `application_checked` | Application `state`, `retry_after`, `updated_at`, and whether that status was checked. These fields do not define an application-submission endpoint. |

RWA quotes use the same create request as other assets. Use their exact catalogue address and decimals; price pauses or stale prices can temporarily block an otherwise supported quote.

**Check native ETH**

```
curl 'https://sento.fun/sento-api/pub-api/quote/check?chain=base'
```

## Errors, limits and retries

Retain `X-Request-Id` for support. It is absent on an unknown-path 404. Limits are per source IP, plus a channel-wide ceiling; creation has a lower quota and other endpoints share a quota. Exact quotas are not published.

| HTTP / business code | Action |
| --- | --- |
| `400` / `4000` | Correct missing or invalid inputs. A quote can have no usable current price; recheck its status rather than repeatedly sending the same request. |
| `404` / `4004` | Token is not v3 on this chain; verify chain and address. |
| `404` / no envelope | Unknown path. Check the path; `/quote/apply` does not exist on this channel. |
| `409` / `4000` | Token cannot currently trade through this API. Use a supported external trading route rather than retrying here. |
| `413` / `4130` | Reduce the JSON body below 1 MiB. |
| `429` / `4290` | Back off from at least one second, double with jitter, and reduce concurrency if persistent. |
| `500` / `5000` | Report the request ID; do not retry indefinitely. |
| `502` / `5000` | Retry with backoff at most three times. Some input errors can be classified as chain-read failures; investigate inputs if it persists. |
| `503` / `5000` | Creation, price service or the service itself is temporarily unavailable. Retry with bounded backoff. |

Retryable HTTP failures do not authorize a second onchain submission. If a transaction hash already exists, inspect its receipt before submitting again. No idempotency-key or hosted-signing feature is defined by this public contract.

