Colorize Video

有料
よって Palette AI | 更新済み 2 महीने पहले | Artificial Intelligence/Machine Learning
人気

9.6 / 10

レイテンシー

587ms

サービスレベル

100%

Health Check

100%

すべてのチュートリアルに戻る (4)

Generate 20 captions (Python)

import requests
import json

X_RapidAPI_Key = '4116843d07msh704be0dfa337826p108b3fj43524’
X_RapidAPI_Host = ‘colorize-video.p.rapidapi.com

headers = {
‘X-RapidAPI-Key’: ‘4116843d07msh704be0dfa337826p108b3fjsn7ab402961f9f’,
‘X-RapidAPI-Host’: ‘colorize-video.p.rapidapi.com’,
}

url = “https://” + X_RapidAPI_Host + “/generate_video_frame_prompt”

files = {
‘image’: (‘test.jpg’, open(’./test.jpg’, ‘rb’), ‘image/jpeg’)
}

data = {
“standard_filter_id”: “0”, # 1-20, 0 is disabled
"artistic_filter_id": “0”, # 1-100, 0 is disabled
"all_standard_filters": “true”, # return all 20 prompts
"all_artistic_filters": “false”, # return all 100 prompts
"raw_captions": “false” # remove pre and post fix to the caption
}

response = requests.post(url, files=files, data=data, headers=headers)
prompts = data = json.loads(response.text)