Developer Quick Start Guide
Welcome to the Kid Smart AI API! This guide will help you get started with integrating our powerful AI tools into your applications.
Overview
Kid Smart AI provides a suite of APIs designed to enhance educational and entertainment applications for children. Our APIs offer capabilities such as fluency assessment, pronunciation analysis, and personalized content generation.
Prerequisites
Before you begin, ensure you have:
- A Kid Smart AI developer account (email info@kidsmart.ai to get started)
- Access to the Customer Dashboard
- An API key generated from the dashboard
Authentication
All API requests require authentication using your API key. Include it in the x-api-key
header:
x-api-key:$KIDSMART_API_KEY
Important: Keep your API key secure. Never expose it in client-side code.
Making Your First API Call
Let's make a simple API call to test your setup. We'll use the Fluency API as an example.
- cURL
- Python
- Node.js
curl https://api.kidsmart.ai/v1/audio/fluency
-H "x-api-key:$KIDSMART_API_KEY"
-F "file=@AUDIO_FILE"
-F "user_token=$USER_ID"
-F "reference_text=@REFERENCE_TEXT"
-F "model_id=$MODEL_ID"
-H "Content-Type: multipart/form-data"
# Coming soon
// Coming soon
Example cURL Request from the Fluency API
You can paste the command below into your terminal to run your first API request. Make sure to replace $KIDSMART_API_KEY with your secret API key.
Step 1 curl https://api.kidsmart.ai/v1/audio/fluency
-H "x-api-key:$KIDSMART_API_KEY"
-F "file=@AUDIO_FILE"
-F "user_token=$USER_ID"
-F "reference_text=@REFERENCE_TEXT"
-F "model_id=$MODEL_ID"
-H "Content-Type: multipart/form-data"
If successful, this will return a JSON response similar to the following:
{
"id":"abc123",
"soapbox_format":"https://api.kidsmart.ai/v1/audio/fluency/result/{result_id}/soapbox_format",
"kidsmart_format":"https://api.kidsmart.ai/v1/audio/fluency/result/{result_id}/kidsmart_format",
}
Extract the value of the status_uri field and use this to retrieve the result. The processing time depends on the length of the file, its complexity (e.g., audio quality) and connection speed. If the result is not yet available, you will receive a HTTP 404 status code. If you encounter a HTTP 404 you should wait a period of time before retrying.
curl https://api.kidsmart.ai/v1/audio/fluency/result/{result_id}/{format}
Interact via Postman
To help you get started quickly, we've created a Postman collection for the Kid Smart AI API. Postman is a popular API development and testing tool that makes it easy to send requests and view responses.
-
Install Postman: If you haven't already, download and install Postman.
-
Import the Collection: Click the link below to import our Postman collection:
-
Set up Environment Variables:
- In Postman, create a new environment.
- Add a variable named
kidsmart_api_key
and set its value to your API key.
-
Download Test Data (Optional): You can download sample test data to use with the Fluency API:
- Send Requests: You can now explore and send requests to various Kid Smart AI endpoints directly from Postman.
Using Postman can significantly speed up your development process and help you understand our API structure better. Feel free to modify the requests to suit your specific needs.
Using Webhooks
Instead of polling for results, you can provide a webhook URL to receive results asynchronously:
- cURL
- Python
- Node.js
curl https://api.kidsmart.ai/v1/audio/fluency
-H "x-api-key:$KIDSMART_API_KEY"
-F "file=@AUDIO_FILE"
-F "user_token=$USER_ID"
-F "reference_text=@REFERENCE_TEXT"
-F "model_id=$MODEL_ID"
-F "webhook_url=https://your-domain.com/webhook-endpoint"
-H "Content-Type: multipart/form-data"
# Coming soon
// Coming soon
The API will respond immediately with an acknowledgment:
{
"id": "e09ecf55-36b5-4936-83f4-ff3439223ed4",
"webhook_notification": "Results will be sent to the provided webhook URL upon completion",
"url": "https://api.kidsmart.ai/v1/audio/recognition/result/e09ecf55-36b5-4936-83f4-ff3439223ed4/"
}
Your webhook endpoint should:
- Accept POST requests
- Process the results asynchronously
- Respond quickly with a 2xx status code
- Handle potential duplicate deliveries
- Implement proper security measures to validate webhook requests
Need some help?
In case you have questions, go through our tutorials.
Or you can check out our community forum, there’s a good chance our community has an answer for you. Visit our developer forum ((add link to discord coming soon)) to review topics, ask questions, and learn from others.