Ask a Question
Submit a question to get an AI-powered solution with step-by-step explanations.Authentication is optional. Authenticated users can save solutions to their history.
POST /api/doubt/ask
Request Parameters
The question to solve. Must be at least 5 characters long.
Subject area of the question (e.g., “Mathematics”, “Physics”, “Chemistry”). Helps the AI provide more contextually relevant answers.
Type of question source. Options:
"text" or "image". Default: "text"URL of an uploaded image containing the question (if source_type is “image”)
Text extracted from an image (if applicable)
Response
Complete solution text
Array of step-by-step solution explanations
Array of key concepts covered in the solution
Estimated difficulty level (e.g., “Beginner”, “Intermediate”, “Advanced”)
Whether the solution was saved to user’s history (true for authenticated users)
Unique identifier for the saved solution (only present if saved is true)
Complete database record of the saved solution (only present if saved is true)
Error Responses
Upload and Extract Image
Extract text from an image using Claude Vision API before submitting a question.POST /api/doubt/upload-image
Request Parameters
Base64-encoded image data (with or without data URI prefix). Maximum size: 10MB.
Response
Text extracted from the image
Auto-detected subject area based on image content
Confidence score for the extraction (0-1)
Error Responses
Get Doubt History
Retrieve all saved doubt solutions for the authenticated user.GET /api/doubt/history
Query Parameters
Filter by subject. Use
"all" or omit to get all subjects.Number of results to return. Default: 50
Number of results to skip (for pagination). Default: 0
Response
Array of saved doubt solutions
Limit applied to the query
Offset applied to the query
Get Specific Doubt
Retrieve details of a specific doubt solution.GET /api/doubt/:id
Path Parameters
The unique identifier of the doubt
Response
Returns a single doubt object with the same structure as the history endpoint.Error Responses
Update Doubt
Update properties of a saved doubt solution.PUT /api/doubt/:id
Path Parameters
The unique identifier of the doubt
Request Parameters
Whether the solution should be publicly visible
Response
Returns the updated doubt object.Delete Doubt
Delete a saved doubt solution.DELETE /api/doubt/:id
Path Parameters
The unique identifier of the doubt
Response
Create Share Link
Generate a shareable link for a doubt solution.POST /api/doubt/:doubtId/share
Path Parameters
The unique identifier of the doubt to share
Response
Unique token for the shared doubt
Complete shareable URL
Share record from database
Get Shared Doubt
Retrieve a publicly shared doubt solution using its share token.GET /api/doubt/shared/:shareToken
Path Parameters
The share token for the doubt
Response
Returns the complete doubt object. Also increments the view count for the shared solution.Number of times this solution has been viewed
Error Responses
Get Recent Solutions
Retrieve recently shared public doubt solutions.GET /api/doubt/recent
Query Parameters
Number of solutions to return. Default: 10
Response
Array of public solutions (limited fields for preview)