# Rediones-AI API Documentation ## Overview Welcome to the Rediones-AI API, a marvel of machine learning that powers the mobile application of Rediones. This API is a collection of endpoints designed to enrich your applications with advanced AI capabilities, including topic generation from images and text, and converting text to realistic voices. ## Base URL All API requests should be made to: [https://api.rediones.com](https://aerial-mission-407204.ue.r.appspot.com/) ## Endpoints ### Home - **Endpoint**: `/` - **Method**: `GET` - **Description**: The welcoming endpoint of the API, guiding you to the treasure trove of AI capabilities. - **Response**: ```json { "message": "Welcome To Rediones API" } ``` ### Health Check - **Endpoint**: `/health` - **Method**: `GET` - **Description**: Checks the pulse of the API to ensure it's up and running. - **Response**: ```json { "message": "OK" } ``` ### Topic Generation - **Endpoint**: `/topicgen` - **Method**: `POST` - **Description**: Generates topics based on the provided image or text. For images, it captions the image and then generates topics. For text, it directly generates topics. - **Request**: - **Form Data**: - `img`: UploadFile (optional) - The image file for captioning and topic generation. - `text`: string (optional) - The text to generate topics from. - `img_url`: string (optional) - The URL of an image to use for captioning and topic generation. - **JSON For text**: ```json { "text": "The existential crisis of a teapot" } ``` - **Response**: ```json { "topics": ["Philosophy of Inanimate Objects", "The Teapot's Lament"] } ``` - **Errors**: - 400: "Only one of image_url or image can be accepted." - 400: "Provide at least text or an image." ### Audioverse - **Endpoint**: `/audioverse` - **Method**: `POST` - **Description**: Converts provided text into realistic voices, with functionality for voice cloning. - **Request**: - **Body**: ```json { "text": "Hello World" } ``` - **Response**: ```json { "audio_base64": "dGhpcyBpcyBub3QgcmVhbGx5IGJhc2U2NCwgYnV0IHlvdSBnZXQgdGhlIGlkZWE=" } ``` ## Rate Limits You're limited to 1000 requests per day. Exceed this limit, and you'll receive a 429 Too Many Requests error. ## Errors Understand how our API communicates issues: - `400 Bad Request`: Your request is missing something or formatted incorrectly. - `401 Unauthorized`: You're not authenticated. Make sure your API key is correct. - `429 Too Many Requests`: You've hit the rate limit. Slow down, turbo. ## Versioning We're always improving. Keep an eye on our changelog for updates. ## Getting Help Lost in the wilderness of our API? Have questions or need support? Contact us at testimonyadekoya.02@gmail.com