{"openapi":"3.1.0","info":{"title":"Waxal — API publique","description":"API publique Waxal : transcription de l'audio wolof, traduction en français et analyse d'impression.\n\nAuthentification : `Authorization: Bearer wx_live_…` (IA réelle) ou `wx_test_…` (bac à sable, IA simulée, gratuit).\nErreurs : `{\"error\": {\"type\", \"code\", \"message\", \"param\", \"request_id\"}}`. Contrat : docs/api-public-v1.md.\n","version":"1.0.0"},"paths":{"/transcriptions":{"post":{"summary":"Créer une transcription","operationId":"create_transcription_transcriptions_post","security":[{"ApiKey":[]}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"description":"Corps de `POST /v1/transcriptions` (JSON, ou parties d'un formulaire multipart avec `file`).","properties":{"audio_url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"description":"https uniquement","title":"Audio Url"},"upload_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"description":"renvoyé par POST /v1/uploads","title":"Upload Id"},"consent":{"description":"doit valoir true","title":"Consent"},"legal_basis":{"default":"consent","enum":["consent","contract","legal_obligation","legitimate_interest"],"title":"Legal Basis","type":"string"},"outputs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"défaut [\"transcript\",\"translation\",\"analysis\"]","title":"Outputs"},"external_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"title":"External Id"},"title":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"title":"Title"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"tags":{"anyOf":[{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"title":"Tags"},"exchange_type_hint":{"anyOf":[{"maxLength":50,"type":"string"},{"type":"null"}],"title":"Exchange Type Hint"},"context":{"anyOf":[{"maxLength":5000,"type":"string"},{"type":"null"}],"title":"Context"},"callback_url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"title":"Callback Url"},"quality":{"default":"standard","enum":["standard","high"],"title":"Quality","type":"string"},"training_consent":{"default":false,"title":"Training Consent","type":"boolean"}},"title":"TranscriptionCreate","type":"object"}},"multipart/form-data":{"schema":{"type":"object","required":["file","consent"],"properties":{"file":{"type":"string","format":"binary","description":"≤ 25 Mo"},"consent":{"type":"string","enum":["true"]},"metadata":{"type":"string","description":"objet JSON sérialisé"},"outputs":{"type":"string","description":"liste JSON, ex. [\"transcript\",\"translation\"]"},"legal_basis":{"default":"consent","enum":["consent","contract","legal_obligation","legitimate_interest"],"title":"Legal Basis","type":"string"},"external_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"title":"External Id"},"title":{"anyOf":[{"maxLength":300,"type":"string"},{"type":"null"}],"title":"Title"},"tags":{"anyOf":[{"items":{"type":"string"},"maxItems":50,"type":"array"},{"type":"null"}],"title":"Tags"},"exchange_type_hint":{"anyOf":[{"maxLength":50,"type":"string"},{"type":"null"}],"title":"Exchange Type Hint"},"context":{"anyOf":[{"maxLength":5000,"type":"string"},{"type":"null"}],"title":"Context"},"callback_url":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}],"title":"Callback Url"},"quality":{"default":"standard","enum":["standard","high"],"title":"Quality","type":"string"},"training_consent":{"default":false,"title":"Training Consent","type":"boolean"}}}}}}},"get":{"summary":"Lister les transcriptions","operationId":"list_transcriptions_transcriptions_get","security":[{"ApiKey":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["queued","processing","completed","failed"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"external_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"External Id"}},{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Tag"}},{"name":"created_gte","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created Gte"}},{"name":"created_lte","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created Lte"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Starting After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/uploads":{"post":{"summary":"Préparer un envoi par URL signée","operationId":"create_upload_uploads_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/transcriptions/{transcription_id}":{"get":{"summary":"Statut d’une transcription","operationId":"get_transcription_transcriptions__transcription_id__get","security":[{"ApiKey":[]}],"parameters":[{"name":"transcription_id","in":"path","required":true,"schema":{"type":"string","title":"Transcription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Supprimer définitivement","operationId":"delete_transcription_transcriptions__transcription_id__delete","security":[{"ApiKey":[]}],"parameters":[{"name":"transcription_id","in":"path","required":true,"schema":{"type":"string","title":"Transcription Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transcriptions/{transcription_id}/result":{"get":{"summary":"Résultat d’une transcription","operationId":"get_result_transcriptions__transcription_id__result_get","security":[{"ApiKey":[]}],"parameters":[{"name":"transcription_id","in":"path","required":true,"schema":{"type":"string","title":"Transcription Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transcriptions/{transcription_id}/export":{"get":{"summary":"Exporter (txt, srt, pdf)","operationId":"export_transcriptions__transcription_id__export_get","security":[{"ApiKey":[]}],"parameters":[{"name":"transcription_id","in":"path","required":true,"schema":{"type":"string","title":"Transcription Id"}},{"name":"format","in":"query","required":false,"schema":{"enum":["txt","srt","pdf"],"type":"string","default":"txt","title":"Format"}},{"name":"lang","in":"query","required":false,"schema":{"anyOf":[{"enum":["wolof","french","both"],"type":"string"},{"type":"null"}],"title":"Lang"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/transcriptions/{transcription_id}/reanalyze":{"post":{"summary":"Réanalyser","operationId":"reanalyze_transcriptions__transcription_id__reanalyze_post","security":[{"ApiKey":[]}],"parameters":[{"name":"transcription_id","in":"path","required":true,"schema":{"type":"string","title":"Transcription Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks":{"get":{"summary":"Lister les abonnements","operationId":"list_webhooks_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"ApiKey":[]}]},"post":{"summary":"Créer un abonnement","operationId":"create_webhook_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookIn"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"ApiKey":[]}]}},"/webhooks/{webhook_id}":{"get":{"summary":"Détail et 20 dernières livraisons","operationId":"get_webhook_webhooks__webhook_id__get","security":[{"ApiKey":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Modifier un abonnement","operationId":"patch_webhook_webhooks__webhook_id__patch","security":[{"ApiKey":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Supprimer un abonnement","operationId":"delete_webhook_webhooks__webhook_id__delete","security":[{"ApiKey":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/{webhook_id}/rotate-secret":{"post":{"summary":"Nouveau secret (l’ancien reste valide 24 h)","operationId":"rotate_secret_webhooks__webhook_id__rotate_secret_post","security":[{"ApiKey":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/{webhook_id}/test":{"post":{"summary":"Envoyer un événement ping","operationId":"test_webhook_webhooks__webhook_id__test_post","security":[{"ApiKey":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/glossary":{"get":{"summary":"Lister le glossaire de l’organisation","operationId":"list_glossary_glossary_get","security":[{"ApiKey":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Q"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["pending","validated","rejected"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"enum":["spelling","proper_noun","business_term","expression"],"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"starting_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Starting After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Ajouter une entrée (validée)","operationId":"create_glossary_glossary_post","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlossaryIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/glossary/{entry_id}":{"patch":{"summary":"Modifier une entrée","operationId":"patch_glossary_glossary__entry_id__patch","security":[{"ApiKey":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlossaryPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Supprimer une entrée","operationId":"delete_glossary_glossary__entry_id__delete","security":[{"ApiKey":[]}],"parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","title":"Entry Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/usage":{"get":{"summary":"Consommation","operationId":"usage_usage_get","security":[{"ApiKey":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"group_by","in":"query","required":false,"schema":{"enum":["day","key"],"type":"string","default":"day","title":"Group By"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"GlossaryIn":{"properties":{"term":{"type":"string","maxLength":300,"minLength":1,"title":"Term"},"correction":{"type":"string","maxLength":300,"minLength":1,"title":"Correction"},"kind":{"type":"string","enum":["spelling","proper_noun","business_term","expression"],"title":"Kind","default":"spelling"},"context":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Context"}},"type":"object","required":["term","correction"],"title":"GlossaryIn"},"GlossaryPatch":{"properties":{"term":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Term"},"correction":{"anyOf":[{"type":"string","maxLength":300,"minLength":1},{"type":"null"}],"title":"Correction"},"kind":{"anyOf":[{"type":"string","enum":["spelling","proper_noun","business_term","expression"]},{"type":"null"}],"title":"Kind"},"context":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Context"}},"type":"object","title":"GlossaryPatch"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"UploadCreate":{"properties":{"filename":{"type":"string","maxLength":300,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":150,"minLength":1,"title":"Content Type"},"size_bytes":{"type":"integer","minimum":0.0,"title":"Size Bytes"}},"type":"object","required":["filename","content_type","size_bytes"],"title":"UploadCreate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookIn":{"properties":{"url":{"type":"string","maxLength":2048,"minLength":1,"title":"Url"},"events":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Events"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"type":"object","required":["url","events"],"title":"WebhookIn"},"WebhookPatch":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Url"},"events":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1},{"type":"null"}],"title":"Events"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Description"}},"type":"object","title":"WebhookPatch"}},"securitySchemes":{"ApiKey":{"type":"http","description":"Clé d’API : wx_live_… (IA réelle) ou wx_test_… (bac à sable)","scheme":"bearer"}}},"servers":[{"url":"/v1"}]}