File size: 1,633 Bytes
b76fc92
 
 
 
 
 
 
37719d5
b76fc92
 
 
 
 
37719d5
b76fc92
 
 
 
37719d5
b76fc92
 
 
 
 
37719d5
b76fc92
 
 
 
1f2e686
37719d5
1f2e686
 
 
b76fc92
37719d5
b76fc92
 
 
 
37719d5
b76fc92
 
 
 
 
37719d5
b76fc92
 
0704750
ad1e1df
37719d5
0704750
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import time
import requests
import os

base_url = os.environ["VERCEL_API"]

def custom_generate_audio(payload):
    url = f"{base_url}api/custom_generate"
    response = requests.post(url, json=payload, headers={'Content-Type': 'application/json'})
    return response.json()


def extend_audio(payload):
    url = f"{base_url}api/extend_audio"
    response = requests.post(url, json=payload, headers={'Content-Type': 'application/json'})
    return response.json()

def generate_audio_by_prompt(payload):
    url = f"{base_url}api/generate"
    response = requests.post(url, json=payload, headers={'Content-Type': 'application/json'})
    return response.json()


def get_audio_information(audio_ids):
    url = f"{base_url}api/get?ids={audio_ids}"
    response = requests.get(url)
    return response.json()


def generate_lyrics(payload):
    url = f"{base_url}api/generate_lyrics"
    response = requests.post(url, json=payload, headers={'Content-Type': 'application/json'})
    return response.json()
    
def get_quota_information():
    url = f"{base_url}api/get_limit"
    response = requests.get(url)
    return response.json()

def get_clip(clip_id):
    url = f"{base_url}api/clip?id={clip_id}"
    response = requests.get(url)
    return response.json()

def generate_whole_song(clip_id):
    payloyd = {"clip_id": clip_id}
    url = f"{base_url}api/concat"
    response = requests.post(url, json=payload)
    return response.json()
    
def generate_lyrics(payload):
    url = f"{base_url}api/generate_lyrics"
    print(url)
    response = requests.post(url, json=payload)
    print(response)
    return response.json()