OmniHuman 1.5
OmniHuman 1.5 pela API do MegaBrain (Sincronização labial): $0.162 por segundo de vídeo. Uma chave para todos os modelos, pagamento a partir de um saldo pré-pago em dólares, sem assinatura.
bytedance/omnihuman-1.5Duração de 1 a 60 s; um vídeo de 5 s custa $0.81.
Cobrado quando a tarefa entra na fila e devolvido se a geração falhar.
Exemplo de resultado
Experimente no navegador
Depois de entrar, o playground da página em inglês roda o OmniHuman 1.5 no navegador, pago com o mesmo saldo da API.
Abrir o playgroundParâmetros da requisição
Campos do corpo JSON da requisição. O modelo não aceita outros campos: uma requisição com eles recebe erro 400.
- prompttextoopcional
- image_urlURLobrigatório
- audio_urlURLobrigatório
- output_resolutiontextoopcional
- Padrão:
1080- Valores:
720,1080
- pe_fast_modetrue / falseopcional
- Padrão:
false
- seednúmero inteiroopcional
- Padrão:
-1
Como usar pela API
Envie a tarefa, consulte o status_url até ficar COMPLETED e baixe o resultado pelo response_url. A mesma chave e o mesmo saldo servem para os modelos de texto. Documentação da API (em inglês)
curl
curl -X POST https://getmegabrain.com/api/gateway/v1/queue/bytedance/omnihuman-1.5 \
-H "Authorization: Bearer $MEGABRAIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt":"a slow dolly shot of a lighthouse at dawn, waves below","image_url":"https://example.com/photo.jpg","audio_url":"https://example.com/voice.mp3"}'
# Then poll status_url and fetch the result from response_url:
curl https://getmegabrain.com/api/gateway/v1/queue/requests/$REQUEST_ID -H "Authorization: Bearer $MEGABRAIN_API_KEY"Python
import os, time, requests
BASE = "https://getmegabrain.com/api/gateway/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['MEGABRAIN_API_KEY']}"}
job = requests.post(f"{BASE}/queue/bytedance/omnihuman-1.5", headers=HEADERS, json={
"prompt": "a slow dolly shot of a lighthouse at dawn, waves below",
"image_url": "https://example.com/photo.jpg",
"audio_url": "https://example.com/voice.mp3"
}).json()
while requests.get(job["status_url"], headers=HEADERS).json()["status"] not in ("COMPLETED", "FAILED"):
time.sleep(2)
print(requests.get(job["response_url"], headers=HEADERS).json())JavaScript
const BASE = 'https://getmegabrain.com/api/gateway/v1';
const headers = {
Authorization: `Bearer ${process.env.MEGABRAIN_API_KEY}`,
'Content-Type': 'application/json',
};
const job = await fetch(`${BASE}/queue/bytedance/omnihuman-1.5`, {
method: 'POST',
headers,
body: JSON.stringify({
"prompt": "a slow dolly shot of a lighthouse at dawn, waves below",
"image_url": "https://example.com/photo.jpg",
"audio_url": "https://example.com/voice.mp3"
}),
}).then(r => r.json());
let status = job.status;
while (status !== 'COMPLETED' && status !== 'FAILED') {
await new Promise(r => setTimeout(r, 2000));
({ status } = await fetch(job.status_url, { headers }).then(r => r.json()));
}
console.log(await fetch(job.response_url, { headers }).then(r => r.json()));Perguntas frequentes
Quanto custa a API do OmniHuman 1.5?
$0.162 por segundo de vídeo. O valor é cobrado de um saldo pré-pago em dólares, e uma geração que falha é reembolsada integralmente. Não há assinatura.
Como usar o OmniHuman 1.5 pela API?
Envie a tarefa com POST https://getmegabrain.com/api/gateway/v1/queue/bytedance/omnihuman-1.5 e sua chave da API do MegaBrain, consulte o status_url até ficar COMPLETED e baixe o resultado pelo response_url. A mesma chave e o mesmo saldo servem para os modelos de texto.
Dá para testar o OmniHuman 1.5 sem escrever código?
Sim: depois de entrar, o playground da página em inglês do modelo roda o OmniHuman 1.5 no navegador, pago com o mesmo saldo da API.