fix(video-render): Kling PiAPI → Native KlingAI (T11 follow-up)
박재오 발견: Kling 공식 API key 발급 (Access Key + Secret Key).
PiAPI gateway가 아닌 native api.klingai.com 사용.
변경:
- providers/kling.py: JWT 인증 (HS256, iss=access_key, exp=now+1800, nbf=now-5).
POST /v1/videos/text2video → GET /v1/videos/{kind}/{task_id} 폴링.
data.task_result.videos[0].url 다운로드.
text2video / image2video 자동 분기.
- .env.example: PIAPI_API_KEY → KLING_ACCESS_KEY + KLING_SECRET_KEY
- docker-compose: 같은 env 교체
- requirements.txt: + PyJWT>=2.8.0
박재오 측: .env에 두 키 모두 입력.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,8 +13,9 @@ OPENAI_API_KEY=__paste_openai_key__
|
||||
# Veo (Google Gemini API — ai.google.dev. Vertex AI 경로 아님, GCS bucket 불필요)
|
||||
GEMINI_API_KEY=__paste_gemini_key__
|
||||
|
||||
# Kling (PiAPI gateway)
|
||||
PIAPI_API_KEY=__paste_piapi_key__
|
||||
# Kling (Native KlingAI — JWT auth with Access Key + Secret Key)
|
||||
KLING_ACCESS_KEY=__paste_kling_access_key__
|
||||
KLING_SECRET_KEY=__paste_kling_secret_key__
|
||||
|
||||
# Seedance 2.0 (BytePlus)
|
||||
SEEDANCE_API_KEY=__paste_seedance_key__
|
||||
|
||||
Reference in New Issue
Block a user