HTTP API Integration Guide
This document explains how to integrate with our Text-based Image Search service using HTTP API
1. Get API Key
- Log in to Admin Dashboard
- Navigate to "API Keys" page
- Click "Generate New Key" button
- Copy and securely store the generated API Key
2. Upload Image
Use POST request to upload and index an image:
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "thumbnail=@/path/to/your/image.jpg" \
-F "biz_id=your_business_id" \
-F "tags=tag1,tag2" \
https://your-domain.com/api/image/v1
Request parameters:
- thumbnail: Image file (required)
- biz_id: Business unique identifier (required)
- tags: Tag list (optional)
Response example:
{
"id": "img_123"
}
3. Search Images by Text
Use POST request to search images by text description:
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "yellow cat",
"tags": ["cat", "table"],
"limit": 10,
"offset": 0
}' \
https://your-domain.com/api/search/v1
Request parameters:
- input: Search text in English (required)
- tags: Filter by tags (optional)
- limit: Number of results to return (optional, default: 10)
- offset: Pagination offset (optional, default: 0)
Response example:
[
{
"thumbnail_url": "https://...",
"biz_id": "your_business_id",
"tags": ["cat", "table", "person"],
"score": 0.95
}
]
Notes
- Keep your API Key secure and don't expose it
- Input text should be in English for best results
- Search results are ordered by similarity score (descending)
- Default limit is 10 results if not specified