Docs
Integrate Suprsonic in five minutes.
Pick a language, install the SDK, paste your key, call any capability. The shape is the same across all 25+ capabilities.
1. Quick start
Install the SDK in your language of choice.
npm install suprsonic
# or
pnpm add suprsonicpip install suprsonicThen make your first call.
import { Suprsonic } from "suprsonic";
const sonic = new Suprsonic({ apiKey: process.env.SUPRSONIC_API_KEY! });
const result = await sonic.web.search({ query: "agent infrastructure" });
console.log(result.results);from suprsonic import Suprsonic
sonic = Suprsonic(api_key="sk_live_...")
result = sonic.web.search(query="agent infrastructure")
print(result.results)2. Authentication
Every request uses the same Bearer token. Issue keys per environment in the Suprsonic dashboard at /app/keys. Keys are 36 characters, prefixed with sk_live_ or sk_test_.
Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3. Request shape
Every Suprsonic capability speaks JSON in and JSON out, on the same envelope.
{
"request_id": "req_01HXAB...",
"credits_used": 2,
"data": { "...capability specific..." }
}4. Errors
Errors return a 4xx or 5xx with a typed body. The SDK throws a SuprsonicError you can catch.
{
"error": {
"type": "rate_limited",
"message": "Too many requests for this key. Retry in 1.4s.",
"request_id": "req_01HXAB12...",
"retry_after_ms": 1400
}
}invalid_requestvalidation issueunauthenticatedmissing or invalid API keyrate_limitedtoo many requests for this keycapability_unavailableupstream temporarily unavailableinsufficient_creditsnot enough credits in the billing period
5. Webhooks
For long-running capabilities (video generation, browser automation, slide decks), Suprsonic delivers an event when the work is finished.
POST https://your-app.com/webhooks/suprsonic
Content-Type: application/json
Suprsonic-Signature: t=1715000000,v1=4f...
{
"id": "evt_01HXAB...",
"type": "video.generate.completed",
"data": {
"request_id": "req_01HXAA...",
"url": "https://cdn.suprsonic.ai/video/...mp4",
"credits_used": 80
}
}6. Capability reference
The full catalog lives in /capabilities. Below is a compact index, grouped by category.
Web
4| Capability | Endpoint | Credits |
|---|---|---|
| Web Search Live results from the open web. | POST /v1/web/search | 2 |
| Web Scrape Any URL to clean Markdown. | POST /v1/web/scrape | 3 |
| Browser Automation Full-page agent inside a browser. | POST /v1/browser/run | 25 |
| URL to Markdown Reader mode for agents. | POST /v1/web/reader | 1 |
Vision
4| Capability | Endpoint | Credits |
|---|---|---|
| Image Generate Text to image, agent-ready. | POST /v1/image/generate | 8 |
| Image Edit Inpaint, outpaint, restyle. | POST /v1/image/edit | 8 |
| Image Understand Caption, classify, and answer questions about an image. | POST /v1/image/understand | 4 |
| OCR Pixels to text. | POST /v1/vision/ocr | 3 |
Media
3| Capability | Endpoint | Credits |
|---|---|---|
| Video Generate Text or image to short video. | POST /v1/video/generate | 80 |
| Chart Render Data to a clean PNG chart. | POST /v1/chart/render | 2 |
| Slides Generate From outline to deck. | POST /v1/slides/generate | 30 |
Voice
3| Capability | Endpoint | Credits |
|---|---|---|
| Speech to Text Transcribe any audio. | POST /v1/voice/transcribe | 3 |
| Text to Speech Studio voice in one call. | POST /v1/voice/synthesize | 2 |
| Speech Translate Audio in one language to text in another. | POST /v1/voice/translate | 4 |
Documents
2| Capability | Endpoint | Credits |
|---|---|---|
| PDF Extract PDF to clean structured text. | POST /v1/documents/pdf | 4 |
| Doc Parse Any office doc to structured Markdown. | POST /v1/documents/parse | 3 |
Code
3| Capability | Endpoint | Credits |
|---|---|---|
| Code Execute Run code in a sandbox. | POST /v1/code/execute | 6 |
| Code Generate Spec to working code. | POST /v1/code/generate | 5 |
| Code Review PR review on autopilot. | POST /v1/code/review | 5 |
Language
4| Capability | Endpoint | Credits |
|---|---|---|
| Translate Text across 100+ languages. | POST /v1/language/translate | 1 |
| Summarize Long text to short text. | POST /v1/language/summarize | 2 |
| Classify Free-form labels for any text. | POST /v1/language/classify | 1 |
| Entity Extract Names, places, money, dates. | POST /v1/language/entities | 1 |
Data
3| Capability | Endpoint | Credits |
|---|---|---|
| Embed Text to vector. | POST /v1/data/embed | 1 |
| Rerank Better order for retrieval. | POST /v1/data/rerank | 2 |
| Vector Search Hosted similarity search. | POST /v1/data/search | 1 |
Communication
3| Capability | Endpoint | Credits |
|---|---|---|
| Email Send Transactional email from an agent. | POST /v1/comm/email | 1 |
| SMS Send Short messages to a phone. | POST /v1/comm/sms | 2 |
| Calendar Schedule Book a meeting from an agent. | POST /v1/comm/calendar | 2 |
Memory
1| Capability | Endpoint | Credits |
|---|---|---|
| Agent Memory Persistent memory per agent. | POST /v1/memory/recall | 1 |
7. Limits and credits
One credit pool covers every capability. Credits reset on the first of each billing period. Rate limits scale with plan: Free is 60 requests / minute, Developer is 600, Scale is 6,000, and Enterprise is custom.