{"openapi":"3.1.0","info":{"title":"PetTalk API","version":"1.0.0","description":"Translate dog and cat sounds. Included in the PetTalk subscription with 500 translate/tts calls per month."},"servers":[{"url":"/api/v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"pt_live_…"}},"schemas":{"Pet":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"species":{"enum":["dog","cat"]},"breed":{"type":["string","null"]},"sex":{"enum":["male","female",null]},"size":{"enum":["mini","small","medium","large","giant",null]},"age_years":{"type":["number","null"]},"energy":{"enum":[1,2,3]},"traits":{"type":"array","items":{"enum":["hungry","playful","affection","alert","annoyed","sleepy"]},"maxItems":3}}},"Translation":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"pet_id":{"type":"string"},"direction":{"enum":["pet_to_human","human_to_pet"]},"input_text":{"type":["string","null"]},"output_text":{"type":"string"},"mood":{"enum":["hungry","playful","affection","alert","annoyed","sleepy"]},"confidence":{"type":"integer"},"emotions":{"type":"object","additionalProperties":{"type":"integer"}},"analysis":{"type":"object"},"created_at":{"type":"string"}}}}},"paths":{"/me":{"get":{"summary":"Account, plan and monthly usage"}},"/pets":{"get":{"summary":"List pets"},"post":{"summary":"Create a pet","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pet"}}}}}},"/pets/{id}":{"get":{"summary":"Get a pet"},"patch":{"summary":"Update a pet"},"delete":{"summary":"Delete a pet"}},"/pets/{id}/translations":{"get":{"summary":"Translation history of a pet"}},"/translate":{"post":{"summary":"Translate a sound (pet_to_human) or a text (human_to_pet). Counts toward the monthly limit.","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["pet_id"],"properties":{"pet_id":{"type":"string","format":"uuid"},"direction":{"enum":["pet_to_human","human_to_pet"],"default":"pet_to_human"},"lang":{"enum":["es","en"]},"audio":{"type":"string","description":"WAV (PCM) in base64, up to 12 s"},"text":{"type":"string","maxLength":280},"intensityDb":{"type":"number"},"pitch":{"type":"number"},"bursts":{"type":"integer"}}}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Translation"}}}},"402":{"description":"Trial expired, subscription required"},"429":{"description":"Monthly limit or rate limit reached"}}}},"/tts":{"post":{"summary":"Text to speech with the species voice (audio/mpeg). Counts toward the monthly limit."}}}}