{"service":"foley","version":"0.3.0","purpose":"Voice cloning and speech synthesis for Marketeer and Backlot.","auth":{"scheme":"Authorization: Bearer <api-key>","key_prefix":"fk-","scopes":{"clone":"Create voices and upload samples.","synthesize":"Submit and read synthesis jobs.","worker":"Claim jobs and upload generated audio."},"admin":"Separate ADMIN_TOKEN guards /admin/*."},"storage":"r2","endpoints":{"POST /v1/voices":"Create a voice.","GET /v1/voices":"List voices with sample counts and total duration.","GET /v1/voices/{id}":"Voice with its samples.","GET /v1/voices/{id}/manifest":"sha256 list — upload only what's missing.","POST /v1/voices/{id}/samples":"multipart upload of one take.","GET /v1/samples/{id}/audio":"Presigned URL (or bytes in local mode).","POST /v1/jobs":"Queue a synthesis job.","GET /v1/jobs/{id}":"Job status, with output_url when done.","POST /v1/worker/claim":"Worker claims one queued job (204 if none).","GET /v1/worker/voices/{id}/bundle":"Samples + presigned URLs for conditioning.","POST /v1/worker/jobs/{id}/output":"Worker uploads generated audio.","PATCH /v1/worker/jobs/{id}":"Worker marks the job done or failed."},"notes":["Sample uploads are idempotent per (voice, sha256) — re-syncing is safe.","Workers only make outbound requests; nothing connects in to the GPU box.","/record/ is the phone field recorder (admin session, not API key) — same samples table and storage prefix as booth sync."]}