API do Kling O3 Standard
API do Kling O3 Standard: de $0.0625 a $0.0813 por segundo, pré-pago, sem assinatura. O modelo de vídeo da Kling com uma única chave; gerações com falha não são cobradas.
Preço · por segundo, USD
Obter uma chave| Configurações | Preço do Kling | UplinkSwitch |
|---|---|---|
| sound false | $0.084 | $0.0625 |
| sound true | $0.112 | $0.0813 |
Quanto custa uma execução · USD, em tempo real
As configurações de menor preço (sound false) cobram $0.0625 por segundo, contra $0.084 no preço da própria Kling; as de maior preço (sound true), $0.0813.
| Executar | A $0.0625 por segundo | A $0.0813 por segundo |
|---|---|---|
| Um clipe de 3 segundos | $0.1875 | $0.2439 |
| Um clipe de 15 segundos | $0.9375 | $1.22 |
| 100 clipes de 15 segundos | $93.75 | $121.95 |
Comparar · por segundo, em tempo real
Kling O3 Standard a partir de $0.0625 por segundo; Kling 2.6 Motion Control a partir de $0.05; Kling 3.0 Motion Control a partir de $0.0756.
Chame-o · POST /v1/generations
curl https://api.uplinkswitch.com/v1/generations \
-H "Authorization: Bearer $UPLINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-o3-standard",
"input": {
"duration": 5,
"multi_shots": false,
"sound": false
}
}'
# then poll until "status" is "succeeded":
curl https://api.uplinkswitch.com/v1/generations/gen_... -H "Authorization: Bearer $UPLINK_API_KEY"import os, time, requests
BASE = "https://api.uplinkswitch.com/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['UPLINK_API_KEY']}"}
payload = {
"model": "kling-o3-standard",
"input": {
"duration": 5,
"multi_shots": False,
"sound": False
}
}
gen = requests.post(f"{BASE}/generations", headers=HEADERS, json=payload, timeout=30).json()
while gen["status"] not in ("succeeded", "failed"):
time.sleep(5)
gen = requests.get(f"{BASE}/generations/{gen['id']}", headers=HEADERS, timeout=30).json()
if gen["status"] == "succeeded":
url = gen["outputs"][0]["url"]
with open(url.rsplit("/", 1)[-1], "wb") as f:
f.write(requests.get(url, headers=HEADERS, timeout=120).content)A requisição é cobrada quando aceita e responde 202 com um id de geração. Consulte GET /v1/generations/{id} até que o status seja succeeded e, em seguida, baixe outputs[0].url; os arquivos ficam disponíveis para download por 30 dias, e uma geração com falha é reembolsada integralmente.
Configurações · na entrada
| Nome | Tipo | Valores | Padrão |
|---|---|---|---|
| image_urls | urls | — | — |
| reference_image_urls | urls | — | — |
| prompt | string | — | — |
| multi_prompt | objetos | — | — |
| duração obrigatória | inteiro | — | — |
| multi_shots obrigatório | booleano | — | false |
| som obrigatório | booleano | — | — |
| aspect_ratio | string | 1:1, 16:9, 9:16 | — |
| kling_elements | objetos | — | — |