Rakesh Vision API
Image Description API Endpoint
This application provides an API endpoint for generating image descriptions using AI. Provide an image URL and get back a description. Access is protected by an API key.
Authentication Required
Requests to this API must include a valid API key in the
X-API-Key header. Contact the administrator to obtain your key. Store your key securely and do not expose it in client-side code.API Endpoint:
POST /api/describeHeaders:
Content-Type: application/json X-API-Key: <YOUR_SECRET_API_KEY>
Request Body (JSON):
{
"photoUrl": "https://example.com/path/to/your/image.jpg"
}Example Usage (cURL):
curl -X POST \
[YOUR_API_URL]/api/describe \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_SECRET_KEY' \
-d '{
"photoUrl": "https://picsum.photos/seed/picsum/800/600"
}'Replace [YOUR_API_URL] with the actual base URL of your deployed application and $YOUR_SECRET_KEY with your assigned secret key.
Success Response (200 OK - JSON):
{
"description": "A detailed description of the image..."
}Error Responses (JSON):
// 400 Bad Request (Invalid Input)
{
"error": "Invalid request body",
"details": { /* Zod validation error details */ }
}
// 401 Unauthorized (Missing or Invalid API Key)
{
"error": "Unauthorized"
}
// 500 Internal Server Error (Generic/AI Error)
{
"error": "Error message detailing the issue"
}