SetuInk API

Voice → clean text, in two REST calls

The same pipeline behind SetuInk — Amazon Transcribe streaming plus Nova cleanup — for your own product. 25 languages including Hinglish. No audio stored, ever.

Get an API key

1 · Clean up a transcript

POST /api/v1/cleanup — send raw speech-to-text, get polished writing back. Fillers removed, self-corrections resolved, formatted for your chosen tone. Works with any STT source, including your own.

curl https://smartecho.app/api/v1/cleanup \
  -H "Authorization: Bearer se_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transcript": "um so send the report Tuesday no wait Wednesday you know",
    "tone": "email",
    "language": "en-US",
    "dictionary": ["Priya", "SigV4"]
  }'

Response:

{
  "cleaned": "Send the report Wednesday.",
  "engine": "us.amazon.nova-lite-v1:0",
  "tone": "email",
  "language": "en-US",
  "usage": { "words": 12, "wordsThisMonth": 4210, "limit": 5000 }
}

Or from JavaScript:

const res = await fetch("https://smartecho.app/api/v1/cleanup", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SMARTECHO_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    transcript: rawSpeechText,
    tone: "chat",          // email | chat | notes | code-comment | formal
    language: "hinglish",  // or any of 25 codes, omit for auto
  }),
});
const { cleaned } = await res.json();

2 · Live transcription sessions

POST /api/v1/transcribe-session — mint a presigned Amazon Transcribe WebSocket URL (valid 5 minutes). Stream 16 kHz PCM from the mic, render partial results live, then pass the final transcript to /v1/cleanup. AWS credentials never touch your client.

curl https://smartecho.app/api/v1/transcribe-session \
  -H "Authorization: Bearer se_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"language": "en-IN"}'

# → { "url": "wss://transcribestreaming.us-east-1…", "expiresInSeconds": 300,
#     "audio": { "encoding": "pcm", "sampleRateHz": 16000, "channels": 1 } }

3 · Understand a transcript

POST /api/v1/understand — raw speech in, a structured communication object out.

curl https://smartecho.app/api/v1/understand \
  -H "Authorization: Bearer se_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transcript": "client ki GST notice vachindi, reply draft cheyyandi, ITC reversal ₹2.4 lakh, due date next Friday",
    "pack": "accounting"
  }'

# → {
#   "language_mix": { "english": 55, "telugu": 45 },
#   "entities": [
#     { "type": "term", "value": "GST" },
#     { "type": "term", "value": "ITC" },
#     { "type": "amount", "value": "₹2.4 lakh" }
#   ],
#   "intent": "draft a reply to a client's GST notice",
#   "summary": "A client received a GST notice about an ITC reversal of ₹2.4 lakh; a reply is due next Friday.",
#   "action_items": ["Draft reply to the GST notice before next Friday"],
#   "pack": "accounting"
# }

4 · Render for destinations

POST /api/v1/render — one utterance, many outputs. Targets come from the selected pack: generic (email, whatsapp, notes, summary), developer (+ github-issue, commit-message, standup), accounting (+ client-email, notice-reply, file-note). Packs also carry domain vocabulary into recognition and cleanup.

curl https://smartecho.app/api/v1/render \
  -H "Authorization: Bearer se_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "transcript": "um tell the backend team deployment moves to Friday because QA found two critical bugs",
    "targets": ["email", "whatsapp", "github-issue"],
    "pack": "developer"
  }'

# → { "outputs": { "email": "Hi team, …", "whatsapp": "deployment moves to Friday …",
#      "github-issue": "**Title**: Move deployment to Friday …" } }

5 · Close the loop

POST /api/v1/feedback — every understand and render response carries an id. Send back a rating and/or your user's corrected text. Corrections improve packs and prompts — SetuInk never retains transcripts. Not metered.

curl https://smartecho.app/api/v1/feedback \
  -H "Authorization: Bearer se_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<id from /v1/understand or /v1/render>",
    "rating": 4,
    "correction": "Hi John, sharing the revised quote…"
  }'

Errors

StatusCodeMeaning
401unauthorizedMissing or invalid Bearer key
402quota-exceededFree monthly API words used up — upgrade to Pro
413transcript-too-longTranscript over 20,000 characters
422unsupported-languageLanguage not available for streaming
502understanding-failed / render-failedModel returned unparseable output — retry
409demo-modeDeployment has no AWS credentials configured

API pricing

Metering is per key, per calendar month, enforced server-side. Keys are created and revoked in the app's API tab.

Rate limits: 60 requests/minute per API key. Responses include Retry-After on 429 — back off and retry. Official SDKs (npm, pip) are coming; the API is plain REST in the meantime.