API Reference Overview
InsightEmbed provides a comprehensive API that allows developers to integrate AI-powered content analysis capabilities directly into their applications. This overview introduces the key concepts and components of the InsightEmbed API.
API Basics
Base URL
All API requests should be made to the following base URL:
https://api.insightembed.com/v1Authentication
All API requests require authentication using an API key. You can generate and manage API keys in your InsightEmbed dashboard.
API keys should be included in the Authorization header of all requests:
Authorization: Bearer YOUR_API_KEYRequest Format
All requests should be made using HTTPS with JSON-encoded bodies (for POST and PUT requests).
Response Format
All API responses are returned in JSON format. A typical response structure includes:
{
"success": true,
"data": { ... },
"meta": { ... }
}In case of an error:
{
"success": false,
"error": {
"code": "error_code",
"message": "Human-readable error message"
}
}Rate Limits
API requests are subject to rate limits based on your subscription plan:
| Plan | Rate Limit |
|---|---|
| Free | 10 requests per minute |
| Starter | 30 requests per minute |
| Pro | 100 requests per minute |
Rate limit information is included in the response headers:
X-RateLimit-Limit: The maximum number of requests allowed per minuteX-RateLimit-Remaining: The number of requests remaining in the current windowX-RateLimit-Reset: The time at which the current rate limit window resets (Unix timestamp)
API Endpoints
The InsightEmbed API is organized into the following main categories:
Content Analysis
Endpoints for analyzing text content:
POST /analyze/text: Analyze text contentPOST /analyze/html: Analyze HTML content
See Content Analysis API for details.
Screenshot Capture
Endpoints for capturing and analyzing screenshots:
POST /capture/screenshot: Capture a screenshot of a URLPOST /analyze/screenshot: Analyze a captured screenshot
See Screenshot Capture API for details.
Image Analysis
Endpoints for analyzing images:
POST /analyze/image: Analyze an uploaded imagePOST /analyze/image/url: Analyze an image from a URL
See Image Analysis API for details.
Account Management
Endpoints for managing your account and API keys:
GET /account: Get account informationGET /usage: Get usage statisticsPOST /api-keys: Generate a new API keyDELETE /api-keys/{key_id}: Delete an API key
See Authentication for details.
Webhooks
InsightEmbed supports webhooks for asynchronous notifications about events in your account:
- Analysis completion
- Quota usage thresholds
- Subscription changes
To configure webhooks, visit the Webhooks section in your dashboard.
SDKs and Client Libraries
InsightEmbed provides official client libraries for popular programming languages:
Error Codes
Common error codes you might encounter when using the API:
| Code | Description |
|---|---|
authentication_error | Invalid or missing API key |
invalid_request | Malformed request or missing required parameters |
rate_limit_exceeded | You've exceeded your rate limit |
quota_exceeded | You've exceeded your monthly analysis quota |
invalid_domain | Request not from an authorized domain |
service_error | Internal service error |
Best Practices
- Store your API key securely and never expose it in client-side code
- Implement proper error handling for API requests
- Use appropriate caching strategies to minimize API calls
- Monitor your usage to avoid hitting rate limits or quotas
- Consider using our official SDKs for simplified integration
Getting Help
If you encounter any issues or have questions about the API:
- Check the detailed documentation for each endpoint
- Visit our FAQ and Troubleshooting section
- Contact our support team at api-support@insightembed.com