Analytics API
The Analytics API allows GPU operators to export analytics data for a given time range. This API provides detailed insights into your GPU operations, including performance metrics, usage statistics, and other operational data.Authentication
All API requests require authentication using a Bearer token. You can generate an API key from the Inference.net Dashboard under the API Keys page.Include your API token in the
Authorization header of all requests: Authorization: Bearer YOUR_API_TOKENBase URL
Interactive API Documentation
You can explore and test the Analytics API using our interactive Swagger documentation:Swagger API Documentation
Interactive API documentation with a live testing interface
Endpoints
Export Operator Analytics
Export analytics data for your GPU operations within a specified time range.Endpoint
Request
Headers| Parameter | Type | Required | Description |
|---|---|---|---|
startDate | string | Yes | Start date for the analytics period (ISO 8601 format) |
endDate | string | Yes | End date for the analytics period (ISO 8601 format) |
All date fields must be provided in ISO 8601 format (e.g.,
2024-01-15T10:30:00Z)Response
Success Response (200 OK) The response will contain your operator analytics data for the specified time range. The exact structure of the response will include:- Performance metrics
- Usage statistics
- GPU utilization data
- Request/response metrics
- Revenue and earnings data (if applicable)
| Status Code | Description |
|---|---|
| 400 | Invalid request parameters - Check your date format and ensure all required fields are provided |
| 401 | Unauthorized - Invalid or missing API token |
| 403 | Forbidden - You don’t have permission to access this resource |
| 500 | Internal server error - Please try again later or contact support |
Code Examples
cURL
JavaScript/TypeScript
Python
Date Format Guidelines
The Analytics API uses ISO 8601 date format for all date/time parameters. This ensures consistent handling of dates across different time zones.Format Pattern
Examples
2024-01-15T00:00:00Z- January 15, 2024 at midnight UTC2024-03-20T14:30:00Z- March 20, 2024 at 2:30 PM UTC2024-12-31T23:59:59Z- December 31, 2024 at 11:59:59 PM UTC
Getting Your API Key
To use the Analytics API, you’ll need an API key:- Log in to the Inference.net Dashboard
- Navigate to the API Keys section
- Click Generate New API Key
- Copy your API key and store it securely
Support
If you encounter any issues or have questions about the Analytics API:- Email: [email protected]
- Check our Swagger documentation for interactive API testing
- Visit the Inference.net Dashboard for account management