Build with SHOFIDAO
One platform, three APIs: SHOFIDAO AI (chat, code, agents, images, video, websites), SHOFIDAO Pay (checkout, payment links, refunds, webhooks) and SHOFIDAO Cloud (databases, storage, queues). Start free with test keys; switch to live keys when you go to production.
erisme-sk-test-. 100 requests a day, real chat answers from the fast model (short), sample results for images, video and projects. Nothing is charged. Perfect to build and demo.erisme-sk-live-. Every model and tool for real, counted on your plan and credits, with your plan's limits. From the Plus plan.Your API keys
Sign in to create keys| Name | Key | Requests | Created |
|---|
SHOFIDAO AI API
The SHOFIDAO AI API is OpenAI-compatible: point any OpenAI SDK to ${ORIGIN}/v1 and use your SHOFIDAO key. Models: erisme-1 (general), erisme-1-code (programming) and erisme-1-agent (uses SHOFIDAO's tools: web, files, images, sites…).
Test and live keys
| erisme-sk-test-… | Test key. Free on every plan once your email is confirmed. 100 requests a day. Chat answers are real but short (fast model, up to 400 tokens). Image, video, project and publishing endpoints return a sample result with the real response shape and "livemode": false. Test keys only open /v1/…. |
| erisme-sk-live-… | Live key. Paid plans (Plus and higher). Every model and tool runs for real and counts on your plan, then on your credits. Responses are the same shape as in test mode. |
Create and revoke keys in Your API keys (top of this page). Keep keys on your server: never in a web page or a mobile app. A leaked key can be revoked in one click.
Chat completions
POST/v1/chat/completions| model | erisme-1, erisme-1-code or erisme-1-agent. |
| messages | The conversation: [{"role":"user","content":"…"}]. A system message is optional. |
| stream | Optional. true sends the answer as server-sent events, like OpenAI. |
| temperature, max_tokens, tools | Optional, same meaning as OpenAI. |
{ "id": "chatcmpl-…", "object": "chat.completion", "model": "erisme-1",
"choices": [{ "index": 0, "finish_reason": "stop", "message": { "role": "assistant", "content": "…" } }] }
GET/v1/modelsTools
Each SHOFIDAO tool has its own endpoint. Send JSON, get JSON. Long tasks return a job id (see below).
| POST /v1/images/generations | Images from a prompt. |
| POST /v1/images/edit | Edit an image you uploaded. |
| POST /v1/videos/generations | Realistic video clips. |
| POST /v1/videos/studio | Edited videos with voice-over. |
| POST /v1/ads/video | Video ads sized for each network. |
| POST /v1/documents | Word, Excel, PowerPoint and PDF files. |
| POST /v1/projects/develop | Full websites and mobile apps (zip). |
| POST /v1/sites/publish | Publish a site on shofidao.com or your domain. |
| POST /v1/code/run | Run code in a sandbox. |
| POST /v1/search, /v1/browse | Web search with sources, read a page. |
| POST /v1/products/research | Winning products and suppliers. |
| POST /v1/uploads | Upload a file to use in other calls. |
Long jobs
Videos, projects and books take time. The answer contains a job_id; check it until status is done or error.
{ "id": "…", "status": "running", "progress": 40, "step": "Rendering scene 2 of 5" }Limits and pricing
Test keys: 100 requests a day, free. Live keys use your plan's daily and monthly limits (messages, images, video seconds, projects…); past the limit SHOFIDAO uses your credits, only if you have them, and never bills more on its own. See Pricing. Errors: 401 wrong or revoked key, 402/403 plan or limit, 429 too many requests.
Quick start
1. Open your SHOFIDAO Pay account and create a secret key in Pay → Developers. 2. From your server, create a Checkout Session. 3. Send your customer to its url. 4. When the payment succeeds, SHOFIDAO Pay sends checkout.session.completed to your webhook and brings the customer back to your success_url.
Authentication
Send your secret key in the Authorization header. Secret keys start with esk_test_ (test mode) or esk_live_ (live mode). Keep them on your server, never in a web page or a mobile app. A key is tied to one SHOFIDAO Pay account; revoke it any time from the dashboard.
Authorization: Bearer esk_test_xxxxxxxxxxxxxxxxxxxxxxxx
Test mode
Everything works in test mode: checkout, links, refunds, events and webhooks, with no real money. The hosted checkout shows buttons to simulate a successful payment, a declined card and insufficient funds. Objects created in test mode have "livemode": false and ids such as cs_test_….
Errors
Errors use normal HTTP status codes and a JSON body with a human-readable message:
{ "detail": "line_items: send 1 to 100 items, each with name, amount (in cents) and quantity." }
| 400 | Something in the request is missing or invalid. |
| 401 | No key, or the key is wrong or revoked. |
| 403 | The account cannot do this (not verified, frozen…). |
| 404 | The object does not exist or is not yours. |
| 409 | Conflict (for example the same Idempotency-Key used for another request). |
| 429 | Too many requests. Wait and retry. |
Idempotency
Networks fail. Add an Idempotency-Key header to every POST (for example your order id). If you send the same key again within 24 hours, SHOFIDAO Pay returns the first answer and does nothing twice. Replayed answers have the header Idempotent-Replayed: true.
Idempotency-Key: order-1042
Checkout Sessions
A hosted, mobile-friendly payment page for one order. Amounts are integers in cents (2500 = $25.00).
POST/api/pay/v1/checkout/sessions| line_items | 1 to 100 items: name, amount (cents, at least 50), quantity (default 1), description (optional). |
| success_url | Where the customer goes after paying. SHOFIDAO adds ?session_id=cs_…. |
| cancel_url | Optional. The "back" link on the checkout. |
| customer_email | Optional. Shown on the checkout. |
| client_reference_id | Optional. Your own id (order number), returned in events. |
| metadata | Optional. Up to 20 keys of your own data. |
| expires_in | Optional. Seconds, from 1800 to 86400 (default 24 h). |
Response
{
"id": "cs_test_9Zk…", "object": "checkout.session", "status": "open",
"url": "${ORIGIN}/checkout/cs_test_9Zk…", "amount_total": 5500, "currency": "usd",
"client_reference_id": "1042", "metadata": {"order": "1042"}, "payment": null, "livemode": false
}
status is open, complete or expired. When complete, payment holds the payment id.
Payment links
A reusable link for one product or service. Share it anywhere: WhatsApp, Instagram, email or QR code. Leave out amount to let the customer choose it (donations, tips).
curl ${ORIGIN}/api/pay/v1/payment_links \
-H "Authorization: Bearer $SHOFIDAO_KEY" -H "Content-Type: application/json" \
-d '{"title":"Logo design","amount":120}'
# → {"slug":"k3Jd9aQx","url":"${ORIGIN}/p/k3Jd9aQx","title":"Logo design","amount":12000}
Here amount is in dollars, as typed in the dashboard. The response gives it back in cents.
Payments
Every successful card payment, from checkout or links. fee is the SHOFIDAO Pay fee and net what you receive.
{ "id": "txn_…", "object": "payment", "amount": 5500, "fee": 190, "net": 5310, "amount_refunded": 0,
"currency": "usd", "status": "succeeded", "source": "checkout", "payer": "Kim", "livemode": false }Refunds
Give money back from your SHOFIDAO Pay balance, all at once or in parts. Leave out amount to refund what is left. The SHOFIDAO Pay fee of the original payment is not returned.
curl ${ORIGIN}/api/pay/v1/refunds -H "Authorization: Bearer $SHOFIDAO_KEY" \
-H "Content-Type: application/json" -H "Idempotency-Key: refund-1042" \
-d '{"payment":"txn_…","amount":500,"reason":"Damaged item"}'Balance
GET/api/pay/v1/balance{ "account": "••4821", "currency": "USD", "livemode": false, "posted": 184250, "available": 174250, "incoming": 0 }
available is what you can use now; money held for pending transfers is already taken out.
Transactions
GET/api/pay/v1/transactions?limit=50Every movement on the account: payments received, refunds, transfers, card purchases.
Events
SHOFIDAO Pay records an event for everything that happens on your account and keeps it so you can catch up at any time.
GET/api/pay/v1/events?type=payment.succeededGET/api/pay/v1/events/{id}| checkout.session.completed | A checkout was paid. Fulfil the order here. |
| checkout.session.expired | A checkout was not paid in time. |
| payment.succeeded | Money received (checkout or link). |
| payment.failed | A card was declined. |
| refund.succeeded | A refund was sent. |
| transfer.received / transfer.sent | Money moved between SHOFIDAO Pay accounts. |
| transfer.posted / returned / rejected | A bank transfer finished, came back, or was not approved. |
| card.purchase | A debit card was used. |
Webhooks
Add your https:// address in Pay → Developers. SHOFIDAO Pay sends each event as a POST with a JSON body. Answer with any 2xx status within 15 seconds. If your server fails, SHOFIDAO retries after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h and 24 h, then marks it failed; you can resend it from the dashboard. The same event can arrive more than once: ignore event ids you already processed.
{ "id": "evt_…", "object": "event", "type": "checkout.session.completed", "created": 1794000000,
"livemode": false, "data": { "object": { "id": "cs_test_…", "status": "complete", "client_reference_id": "1042", … } } }Verify signatures
Every webhook has an SHOFIDAO-Signature header: t=<unix time>,v1=<signature>. Compute HMAC-SHA256 of t + "." + raw body with your webhook secret, compare it with v1 in constant time, and refuse calls older than 5 minutes.
Limits
Up to 600 API calls per minute per key. Checkouts up to $1,000,000; items from $0.50. Daily sending limits and reviews protect accounts; see your limits in the dashboard.