{"openapi":"3.0.3","info":{"title":"Simba Sauti","version":"1.0.0-beta","description":"Speech to text with separate speakers and word timings, on our own servers. Swahili, English, Russian and code-switching between them. USD 1.00 per hour of audio, billed per second (minimum 15 s); 30 free minutes on sign-up during the beta. Pay with USDT (TRC20, automatic) or M-Pesa.","contact":{"email":"info@simba.coffee","url":"https://www.simba.coffee/sauti"}},"servers":[{"url":"https://api.simba.coffee/api/sauti"}],"components":{"securitySchemes":{"key":{"type":"http","scheme":"bearer","description":"Your secret key sk_sauti_… from POST /signup"}},"schemas":{"Error":{"type":"object","properties":{"statusCode":{"type":"integer"},"message":{"type":"string"},"needSeconds":{"type":"number"},"balanceSeconds":{"type":"number"},"topup":{"type":"string"}}},"Segment":{"type":"object","properties":{"start":{"type":"number"},"end":{"type":"number"},"speaker":{"type":"string","example":"Speaker 0"},"text":{"type":"string"},"language":{"type":"string","example":"sw"}}},"Result":{"type":"object","properties":{"text":{"type":"string"},"durationSeconds":{"type":"number"},"language":{"type":"string","nullable":true},"languages":{"type":"object","additionalProperties":{"type":"number"}},"speakers":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"seconds":{"type":"number"}}}},"speakersSeparated":{"type":"boolean"},"segments":{"type":"array","items":{"$ref":"#/components/schemas/Segment"}},"words":{"type":"array","items":{"type":"object","properties":{"word":{"type":"string"},"start":{"type":"number"},"end":{"type":"number"},"confidence":{"type":"number"}}}}}},"Job":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","failed","expired"]},"audioSeconds":{"type":"number"},"billedSeconds":{"type":"number"},"estimatedStartSeconds":{"type":"number"},"error":{"type":"string"},"result":{"$ref":"#/components/schemas/Result"}}}}},"paths":{"/info":{"get":{"summary":"Price, limits, payment methods, queue length","responses":{"200":{"description":"Service facts"}}}},"/signup":{"post":{"summary":"Create an account; returns the secret key ONCE","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["person","agent"]}}}}}},"responses":{"201":{"description":"{ apiKey, freeMinutes, balanceSeconds }"},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"security":[{"key":[]}],"summary":"Balance, recent jobs and payments","responses":{"200":{"description":"Account"},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs":{"post":{"security":[{"key":[]}],"summary":"Queue a recording (multipart \"file\", or JSON {\"url\"}). The cost is taken now and returned if the job fails.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"languages":{"type":"string","example":"sw,en"},"speakers":{"type":"boolean","default":true},"prompt":{"type":"string","description":"Names and terms to spell right, up to 200 characters"}}}},"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"https URL of the audio"},"languages":{"type":"string"},"speakers":{"type":"boolean"},"prompt":{"type":"string"}}}}}},"responses":{"201":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"402":{"description":"Balance too low — top up (body says how much is needed)"},"413":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{id}":{"get":{"security":[{"key":[]}],"summary":"Status; the transcript when status is done (poll every 15–30 s)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"security":[{"key":[]}],"summary":"Delete the transcript now (a queued job is refunded)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted"}}}},"/topups":{"post":{"security":[{"key":[]}],"summary":"Buy minutes. usdt: send the exact amount shown (credited automatically). paypal: open approveUrl. mpesa: pay the till, then POST /topups/{id}/mpesa.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amountUsd","method"],"properties":{"amountUsd":{"type":"number","minimum":2,"maximum":500},"method":{"type":"string","enum":["usdt","paypal","mpesa"]}}}}}},"responses":{"201":{"description":"Payment instructions"},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/topups/{id}":{"get":{"security":[{"key":[]}],"summary":"Top-up status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Top-up"}}}},"/topups/{id}/check":{"post":{"security":[{"key":[]}],"summary":"USDT: ask the chain now instead of waiting for the 2-minute check","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Top-up"}}}},"/topups/{id}/mpesa":{"post":{"security":[{"key":[]}],"summary":"M-Pesa: send the transaction ID from your SMS","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["transactionId"],"properties":{"transactionId":{"type":"string"}}}}}},"responses":{"200":{"description":"Waiting for confirmation"}}}}}}