Fetch an audio (Stable Audio)
API Reference
Examples
const main = async () => {
const params = new URLSearchParams({
generation_id: "<YOUR_GENERATION_ID>"
});
const response = await fetch(`https://api.aimlapi.com/v2/generate/audio?${params.toString()}`, {
method: 'GET',
headers: {
Authorization: 'Bearer <YOUR_API_KEY>',
'Content-Type': 'application/json',
},
}).then((res) => res.json());
console.log('Generation:', response);
};
main()
import requests
def main():
url = "https://api.aimlapi.com/v2/generate/audio"
params = {
"generation_id": "<YOUR_GENERATION_ID>",
}
headers = {"Authorization": "Bearer <YOUR_API_KEY>", "Content-Type": "application/json"}
response = requests.get(url, params=params, headers=headers)
print("Generation:", response.json())
if __name__ == "__main__":
main()
Last updated