Authentication and keys
Send a key with every call, or call without one at the keyless tier.
API keys
Keys look like tide_ followed by 32 letters and digits. Create them with the Get an API key link at the top of the page, by signing in with a Sui wallet. A key is shown once, so copy it when you make it. tide stores only a hash.
Pass the key in any of three ways.
curl "https://api.tide.ad/v1/coins/0x2::sui::SUI?api-key=YOUR_API_KEY"curl "https://api.tide.ad/v1/coins/0x2::sui::SUI" \
-H "x-api-key: YOUR_API_KEY"curl "https://api.tide.ad/v1/coins/0x2::sui::SUI" \
-H "Authorization: Bearer YOUR_API_KEY"The header forms keep the key out of logs and browser history. Use them from servers. Never ship a key in a public web page without an allowed origin rule on it.
The keyless tier
With no key, calls are counted per client IP: 2 requests a second and 1,000 credits a day. Streams and webhooks need a key. Every keyless response has an x-tide-hint header that points to the free key page.
Keys for agents
An agent can get a Free key with one signed call. No email and no payment. It signs a challenge with any Sui key.
POST /v0/auth/noncewith{ "address": "0x..." }returns a message to sign.- Sign the message as a Sui personal message. Any signature scheme works, including zkLogin and multisig.
POST /v0/keys/agentwith{ "address": "0x...", "signature": "..." }returns a key.
curl -X POST "https://api.tide.ad/v0/auth/nonce" \
-H "content-type: application/json" \
-d '{ "address": "0xYOUR_ADDRESS" }'
# sign the returned message with your Sui key, then:
curl -X POST "https://api.tide.ad/v0/keys/agent" \
-H "content-type: application/json" \
-d '{ "address": "0xYOUR_ADDRESS", "signature": "SIGNATURE" }'The key belongs to that address. Keys made this way are Free plan keys. Signing in on tide.ad uses the same two calls with /v0/auth/verify, which returns a session token that starts with tsess_.
Paying without a key
A request with no key over the keyless daily limit, or with a key that is out of credits, gets 402 Payment Required with the offers to pay in USDC. Pay one, retry the same request, and the response carries an X-Tide-Api-Key header.
That key is derived from the paying Sui address, the same key every time. Use it as Authorization: Bearer for the rest of the session. Details, offers and prices: Pay with USDC.
curl -i "https://api.tide.ad/v1/coins/0x2::sui::SUI"
# HTTP/2 402, with a payment-required header and the offers in the bodyAllowed origins and IPs
Each key can carry a list of allowed origins and a list of allowed IPs. A browser call from another origin, or any call from another IP, fails with forbidden_origin. Set the lists when you create or edit a key. An empty list allows everything.
| Use | Rule |
|---|---|
| A web app calling from the browser | Allowed origin for your site, for example https://app.example.com |
| A server or bot | Allowed IP of the machine |
| Local development | Allowed origin http://localhost:3000, or leave the key unrestricted |
Response headers
| Header | Meaning |
|---|---|
| x-ratelimit-limit | Requests a second your key may use in this class. |
| x-ratelimit-remaining | Requests left in the current window. |
| x-ratelimit-reset | When the window resets. |
| x-credits-cost | Credits this call used. |
| x-credits-remaining | Credits left this month (keyless: today). |
| retry-after | Seconds to wait. Sent with a 429. |
| x-request-id | Quote this when you ask for help. |
Errors cost no credits.
Account methods
These calls manage keys and read usage. They use a session token or sign-in, not credits.
| Method | What it does | Credits |
|---|---|---|
| auth.noncePOST /v0/auth/nonce | Start a sign-in: get a message to sign with a Sui key. | Free |
| auth.verifyPOST /v0/auth/verify | Finish sign-in: trade a signature for a 30-day session token. | Free |
| keys.agentPOST /v0/keys/agent | Agents: sign one message with any Sui key, get a Free API key. | Free |
| keys.listGET /v0/keys | List your API keys. | Free |
| keys.createPOST /v0/keys | Create an API key. | Free |
| keys.updatePUT /v0/keys/:id | Rename a key or change where it works. | Free |
| keys.revokeDELETE /v0/keys/:id | Revoke an API key. | Free |
| account.getGET /v0/account | Your plan, credits used and left this month, and limits. | Free |
| account.usageGET /v0/account/usage | Usage per day and method. | Free |
| intel.cases.createPOST /v1/intel/cases | Save an investigation as a case file. | Free |
| intel.cases.listGET /v1/intel/cases | List your case files. | Free |
| intel.cases.getGET /v1/intel/cases/:caseID | Read one case file. | Free |
| intel.cases.updatePUT /v1/intel/cases/:caseID | Save changes to a case file. | Free |
| intel.cases.deleteDELETE /v1/intel/cases/:caseID | Delete a case file. | Free |
| intel.cases.duplicatePOST /v1/intel/cases/:caseID/duplicate | Copy a case into your account. | Free |
| account.pins.getGET /v1/account/pins | Read the pins on your home page. | Free |
| account.pins.putPUT /v1/account/pins | Save the pins on your home page. | Free |
| billing.getGET /v1/billing | Your credits: plan credits left this month, prepaid USDC credits, auto top-up. | Free |
| billing.historyGET /v1/billing/history | Every USDC payment credited to your account, newest first. | Free |
| billing.topupPOST /v1/billing/topup | Build an unsigned USDC top-up transaction to sign. | Free |
| billing.submitPOST /v1/billing/topup/submit | Send a signed top-up and get the credits once it is final. | Free |
| billing.allowancePOST /v1/billing/allowance | Build an unsigned sui::allowance grant for auto top-up. | Free |
| billing.allowanceConfirmPOST /v1/billing/allowance/confirm | Turn on auto top-up after your allowance grant is on chain. | Free |
| billing.autotopupPUT /v1/billing/autotopup | Change auto top-up: on or off, threshold, draw size. | Free |
| billing.revokePOST /v1/billing/allowance/revoke | Build an unsigned revoke for your auto top-up allowance. | Free |
| billing.offersGET /v1/billing/offers | x402 and MPP payment offers to buy credits without signing in. | Free |
| billing.payPOST /v1/billing/pay | Settle an x402 or MPP payment and get its credits and API key. | Free |