REST API Quickstart
REST API Quickstart
Integrate SeeMe.ai with any programming language using our REST API. This guide covers authentication and common endpoints.
What You’ll Accomplish
- Authenticate with the API
- Make predictions via HTTP
- List and manage resources
- Handle API responses
Prerequisites
- A SeeMe.ai account (sign up)
- An API key (generate at app.seeme.ai/settings/api-keys)
- HTTP client (curl, Postman, or your language’s HTTP library)
Base URL
All API requests use this base URL:
https://api.seeme.ai/api/v1Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYTest Your Connection
Make a Prediction
The most common operation: send data to a model and get predictions.
Image Prediction
Response Format
{
"id": "pred_abc123",
"model_id": "model_xyz",
"predictions": [
{
"label": "cat",
"confidence": 0.9432
},
{
"label": "dog",
"confidence": 0.0321
}
],
"inference_time_ms": 45,
"created_at": "2024-01-15T10:30:00Z"
}Common Endpoints
Models
| Method | Endpoint | Description |
|---|---|---|
| GET | /models | List your models |
| GET | /models/{id} | Get model details |
| GET | /models/{id}/versions | List model versions |
| POST | /models/{id}/predict | Make a prediction |
Datasets
| Method | Endpoint | Description |
|---|---|---|
| GET | /datasets | List your datasets |
| POST | /datasets | Create a dataset |
| GET | /datasets/{id} | Get dataset details |
| DELETE | /datasets/{id} | Delete a dataset |
| POST | /datasets/{id}/versions/{vid}/upload | Upload data |
Jobs
| Method | Endpoint | Description |
|---|---|---|
| GET | /jobs | List training jobs |
| POST | /jobs | Create a training job |
| GET | /jobs/{id} | Get job status |
| POST | /jobs/{id}/cancel | Cancel a job |
List Models Example
Create a Training Job
Error Handling
The API returns standard HTTP status codes:
| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad request (check your parameters) |
| 401 | Unauthorized (check your API key) |
| 403 | Forbidden (insufficient permissions) |
| 404 | Not found |
| 429 | Rate limited (slow down) |
| 500 | Server error |
Error Response Format
{
"error": {
"code": "invalid_request",
"message": "The 'file' field is required",
"details": {
"field": "file"
}
}
}Handle Errors in Code
import requests
response = requests.post(url, headers=headers, files=files)
if response.status_code == 200:
predictions = response.json()["predictions"]
elif response.status_code == 401:
print("Invalid API key")
elif response.status_code == 404:
print("Model not found")
elif response.status_code == 429:
print("Rate limited - wait and retry")
else:
error = response.json().get("error", {})
print(f"Error: {error.get('message', 'Unknown error')}")Rate Limits
| Plan | Requests/minute | Requests/day |
|---|---|---|
| Free | 60 | 1,000 |
| Pro | 300 | 50,000 |
| Enterprise | Custom | Unlimited |
Rate limit headers are included in every response:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705312800Pagination
List endpoints support pagination:
GET /models?limit=20&offset=0Response includes pagination info:
{
"models": [...],
"pagination": {
"total": 45,
"limit": 20,
"offset": 0,
"has_more": true
}
}What’s Next?
More REST API Examples
These pages include detailed REST API examples alongside Python SDK code: