Saltar para o conteúdo principal

Documentation Index

Fetch the complete documentation index at: https://docs.youka.io/llms.txt

Use this file to discover all available pages before exploring further.

Guia rápido de HTTP bruto

Use este guia quando você quiser exemplos diretos de HTTP. Se você estiver desenvolvendo em Node.js ou Bun, comece com o guia rápido do SDK para Node.js.

1. Criar um destino de upload

curl -X POST https://api.youka.io/pt/api/v1/uploads \
  -H "Authorization: Bearer yk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "song.mp3",
    "contentType": "audio/mpeg",
    "contentLength": 12345678
  }'
Envie os bytes do arquivo para o uploadUrl retornado.

2. Criar um projeto

curl -X POST https://api.youka.io/pt/api/v1/projects \
  -H "Authorization: Bearer yk_..." \
  -H "Idempotency-Key: create-project-song-1" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Artist - Song",
    "inputFileId": "file_123",
    "lyricsSource": {
      "type": "align",
      "lyrics": "First line\nSecond line\n...",
      "syncModel": "musicai-alignment",
      "language": "en"
    },
    "splitModel": "mdx23c"
  }'

3. Consultar a tarefa

curl https://api.youka.io/pt/api/v1/tasks/task_123 \
  -H "Authorization: Bearer yk_..."
Quando a tarefa chegar a um estado terminal, o output conterá os principais IDs de resultado da operação.

4. Ler o estado do projeto

curl https://api.youka.io/pt/api/v1/projects/proj_123 \
  -H "Authorization: Bearer yk_..."
Isso retorna o estado duradouro do projeto, incluindo stems, alinhamentos, exportações e as configurações ativas do projeto.

5. Criar uma exportação

curl -X POST https://api.youka.io/pt/api/v1/projects/proj_123/exports \
  -H "Authorization: Bearer yk_..." \
  -H "Idempotency-Key: export-song-1" \
  -H "Content-Type: application/json" \
  -d '{
    "resolution": "1080p",
    "quality": "high"
  }'
Em seguida, consulte a tarefa retornada ou leia a exportação diretamente:
curl https://api.youka.io/pt/api/v1/exports/export_123 \
  -H "Authorization: Bearer yk_..."