API Documentation
Welcome to the Glidelab API documentation. Our API provides direct access to our powerful generative models, allowing you to integrate AI-powered content creation into your own applications and services. API access is available on the Enterprise plan.
Authentication
All API requests must be authenticated using an API key. You can generate and manage your API keys in the dashboard. Include your API key in the Authorization header of your requests as a Bearer token.
Authorization: Bearer YOUR_API_KEY
Generate Voice
This endpoint synthesizes speech from text input.
POST /v1/voice
Request Body
{
"text": "Hello, world! This is a test of the Glidelab voice synthesis API.",
"voice_id": "voice_en_standard_1",
"format": "mp3"
}
Example Response
{
"status": "success",
"audio_url": "https://cdn.glidelab.com/audio/generated_audio_id.mp3",
"duration_seconds": 5.2
}
Generate Image
This endpoint creates an image from a text prompt.
POST /v1/image
Request Body
{
"prompt": "A futuristic cityscape at sunset, synthwave style, hyper-detailed",
"size": "1024x1024",
"quality": "hd"
}
Example Response
{
"status": "success",
"image_url": "https://cdn.glidelab.com/images/generated_image_id.png",
"prompt_used": "A futuristic cityscape at sunset, synthwave style, hyper-detailed"
}
Generate Code
This endpoint generates a code snippet based on a description.
POST /v1/code
Request Body
{
"prompt": "Write a python function that takes a list of integers and returns the sum.",
"language": "python"
}
Example Response
{
"status": "success",
"language": "python",
"code": "def sum_list(numbers):\n total = 0\n for number in numbers:\n total += number\n return total"
}