Please Log In

You need to log in to access your API credentials and start using our APIs. Start with our free trial!

Log In & Start Free Trial

Usage API

Get comprehensive usage statistics for all your API requests in one place.

API Endpoint

https://api.nyne.ai/usage

Try the API Playground

Test the API with our interactive playground to make real requests and see live responses.

Launch Usage Playground

Overview

The Usage API provides a single endpoint to view all your API usage across enrichment and search requests. It shows credits consumed, monthly allocation, and detailed breakdowns.

Key Features

  • Unified Usage Tracking: View all API usage in one place
  • Credit Breakdown: See credits used by API type
  • Monthly Allocation: Track remaining credits
  • Request Counts: Monitor API request volume

Authentication

All API requests require authentication using your API key and secret. You can authenticate using either HTTP headers (recommended) or query parameters.

Header Authentication (Recommended)
X-API-Key: your_api_key_here
X-API-Secret: your_api_secret_here

Rate Limits

API usage is controlled by rate limiting mechanisms to ensure fair usage and system stability:

  • Per Minute: 60 requests
  • Per Hour: 1000 requests
  • Monthly: Varies by plan

Unified Usage Tracking

The Usage API provides a single endpoint to view all your API usage across enrichment and search requests. It shows credits consumed, monthly allocation, and detailed breakdowns.

GET /usage

Get comprehensive usage statistics including credits used, monthly allocation, and breakdown by API type.

GET /usage

Parameters

month (integer, optional)
Month to get statistics for (1-12)
Default: Current month
year (integer, optional)
Year to get statistics for (2020-2030)
Default: Current year

Request Example

GET /usage?month=12&year=2024

Response Example

{ "success": true, "data": { "month": 12, "year": 2024, "period": "2024-12", "credits_used": { "total": 68, "search": 45, "enrichment": 23 }, "requests_count": { "total": 25, "search": 15, "enrichment": 10 }, "limits": { "monthly_allocation": 10000, "available_credits": 9932, "is_unlimited": false }, "breakdown": { "search_results_returned": 45, "enrichments_performed": 23, "total_credits_consumed": 68 } } }

Credit Counting

Credits are counted based on the actual results and enrichments performed:

Example: Search with Enrichment

If you make a search request that returns 3 results and you enable enrichment:

  • Search results: HASH(0x563a177e5d88) × 3 = 284422506748056 credits (HASH(0x563a177e5d88) per result returned)
  • Enrichments: HASH(0x563a16fa4028) × 3 = 284422480773240 credits (HASH(0x563a16fa4028) per enrichment performed)
  • Total credits: 568844987521296 credits

Example: Direct Enrichment

If you make a direct enrichment request:

  • Enrichment: HASH(0x563a16fa4028) credits (HASH(0x563a16fa4028) per enrichment performed)
  • Total credits: HASH(0x563a16fa4028) credits

Credit Breakdown

  • Person Search API: HASH(0x563a177e5d88) credits per search result returned
  • Person Enrichment API: HASH(0x563a16fa4028) credits per enrichment performed
  • Person Search + Person Enrichment: Credits for results + credits for enrichments

Response Format

All API responses follow a consistent JSON format:

Success Response

{ "success": true, "data": { ... }, "timestamp": "2024-01-15T10:30:00Z" }

Error Response

{ "success": false, "error": { "code": "error_code", "message": "Error message" }, "timestamp": "2024-01-15T10:30:00Z" }

Error Codes

HTTP Code Error Code Description
400 invalid_month Month must be between 1 and 12
400 invalid_year Year must be between 2020 and 2030
400 invalid_date Cannot get statistics for future months
401 missing_api_key API key is required
401 invalid_api_key Invalid API key provided
401 missing_api_secret API secret is required
401 invalid_api_secret Invalid API secret provided
403 api_key_disabled API key is disabled
429 rate_limit_exceeded Too many requests per minute/hour
500 internal_error Internal server error

Support

Need help? Contact our support team:

Email: support@nyne.com