TinkerAI API Documentation

Overview

This API allows you to gather biometric data (fingerprints, retinal scans). The data collected is used to provide personalized learning paths tailored to each child's unique needs.

Base URL

https://api.tinkerai.com/v1

Authentication

All API requests must include an API key. Include your API key in the header of each request.

Header Example:

Authorization: Bearer <your_api_key>

Endpoints

1. Collect Biometric Data

Endpoint:

POST /collect-biometrics

Description: Collects biometric data (fingerprint and retinal scan) from a child.

Request:

Headers:

Content-Type: application/json Authorization: Bearer <your_api_key>

Body:

{ "child_id": "string", "fingerprint_data": "base64_encoded_string", "retinal_scan_data": "base64_encoded_string" }

Response:

{ "status": "success", "message": "Biometric data collected successfully", "data": { "child_id": "string", "biometric_id": "string" } }

2. Predict Personality and Learning Behavior

Endpoint:

POST /predict-behavior

Description: Runs the machine learning model to predict the child's personality and learning behaviors based on the collected biometric data.

Request:

Headers:

Content-Type: application/json Authorization: Bearer <your_api_key>

Body:

{ "biometric_id": "string" }

Response:

{ "status": "success", "message": "Prediction completed successfully", "data": { "child_id": "string", "personality_traits": { "trait_1": "value", "trait_2": "value" }, "learning_behaviors": { "behavior_1": "value", "behavior_2": "value" }, "recommendations": { "learning_path": "description", "activities": ["activity_1", "activity_2"] } } }

Example Usage

Collect Biometric Data

Request:

POST /collect-biometrics Authorization: Bearer 12345678-abcd-efgh-ijkl-9876543210mn Content-Type: application/json { "child_id": "child_1234", "fingerprint_data": "dGhpcyBpcyBhIGZpbmdlcnByaW50IGRhdGE=", "retinal_scan_data": "dGhpcyBpcyBhIHJldGluYWwgc2NhbiBkYXRh" }

Response:

{ "status": "success", "message": "Biometric data collected successfully", "data": { "child_id": "child_1234", "biometric_id": "biometric_5678" } }

Predict Personality and Learning Behavior

Request:

POST /predict-behavior Authorization: Bearer 12345678-abcd-efgh-ijkl-9876543210mn Content-Type: application/json { "biometric_id": "biometric_5678" }

Response:

{ "status": "success", "message": "Prediction completed successfully", "data": { "child_id": "child_1234", "personality_traits": { "creativity": "high", "attention_span": "medium" }, "learning_behaviors": { "visual_learner": "yes", "interactive_learning": "preferred" }, "recommendations": { "learning_path": "Encourage visual and interactive learning activities", "activities": ["Drawing exercises", "Interactive games"] } } }

Error Handling

The API uses standard HTTP status codes to indicate the success or failure of an API request. Common status codes include:

  • 200 OK - The request was successful.

  • 400 Bad Request - The request was invalid or cannot be otherwise served.

  • 401 Unauthorized - Authentication failed or user does not have permissions for the requested operation.

  • 500 Internal Server Error - An error occurred on the server.

Error Response Example:

{ "status": "error", "message": "Invalid biometric data", "error_code": 4001 }

For further assistance, please contact our support team at support@tinkercolor.com.

 
Previous
Previous

Dermatoglyphics and Its Relation to Intelligence Levels of Young Students