> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.pixalate.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.pixalate.com/_mcp/server.

# Read your account's usage

GET https://epg-api.pixalate.com/v1/enrich

With no body, a `GET` on this path enriches nothing: it reports the usage of the
account your key belongs to, across all of the account's keys, over the trailing 30
UTC days, today included. Call it with the same key your integration uses to monitor
usage programmatically. It answers exactly what `GET /quota` answers. Query
parameters are not read.

Reading it is not usage: it counts against neither your rate ceiling nor your usage.
The figure is refreshed at most once a minute, so a served request shows up in
`used` within about a minute; polling more often than that returns the same
figure. It also answers a browser on
any origin, so a dashboard can call it directly; send the key in `x-api-key` (or
`Authorization: Basic`) and make the request without cookies. A mock credential is
never billed, so its usage always reads 0.


Reference: https://docs.pixalate.com/api-reference/openepg/usage/get-usage

## Authentication

- `x-api-key` header (required) — Your Pixalate-provided API key, in the request header on every route. Credentials are never accepted in query parameters. An API key may be obtained by signing up for an account on the [Pixalate developer website](https://developer.pixalate.com).
- `Authorization` header (basic auth, required) — Username/password alternative to the API-key header. Headers only — credentials are never accepted in query parameters.

## Response

### 200

The account's usage.

- `used` (integer, required) — Billable units over the window: each served request or batch item, except a `NO_COVERAGE` outcome. A rejected request is never counted.
- `limit` (integer, required, nullable) — Always null.
- `available` (integer, required, nullable) — Always null.
- `unlimited` (boolean, required) — Always true.
- `interval` (integer, required) — The window's length in `timeUnit`, ending with and including today (UTC).
- `timeUnit` (enum, required)
  - Allowed values: `day`
- `expiry` (string, required, nullable) — Always null.

## Errors

### 401 Unauthorized Error

Missing or unknown credential.

- `code` (enum, required) — Machine-readable error code. A code names a product condition the HTTP status cannot express; where there is no such distinction the code is the status name, so branch on the status first and on the code only for the values below. RATE_LIMITED is a 429 from a request-rate ceiling and clears within the window. BATCH_TOO_LARGE means the batch exceeded the documented item cap — split and retry. TIMESTAMP_OUT_OF_WINDOW means the instant requested lies outside the 7-day coverage window or more than 5 minutes in the future.
  - Allowed values: `BAD_REQUEST`, `BATCH_TOO_LARGE`, `TIMESTAMP_OUT_OF_WINDOW`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `PAYLOAD_TOO_LARGE`, `RATE_LIMITED`, `SERVICE_UNAVAILABLE`
- `message` (string, required)

### 403 Forbidden Error

Known credential without entitlement to this product.

- `code` (enum, required) — Machine-readable error code. A code names a product condition the HTTP status cannot express; where there is no such distinction the code is the status name, so branch on the status first and on the code only for the values below. RATE_LIMITED is a 429 from a request-rate ceiling and clears within the window. BATCH_TOO_LARGE means the batch exceeded the documented item cap — split and retry. TIMESTAMP_OUT_OF_WINDOW means the instant requested lies outside the 7-day coverage window or more than 5 minutes in the future.
  - Allowed values: `BAD_REQUEST`, `BATCH_TOO_LARGE`, `TIMESTAMP_OUT_OF_WINDOW`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `PAYLOAD_TOO_LARGE`, `RATE_LIMITED`, `SERVICE_UNAVAILABLE`
- `message` (string, required)

### 503 Service Unavailable Error

Usage cannot be reported right now. Either the usage counters are temporarily unavailable, and a retry after the indicated delay will succeed, or your key's account cannot be attributed to a group, which retrying will not fix: contact support.

- `code` (enum, required) — Machine-readable error code. A code names a product condition the HTTP status cannot express; where there is no such distinction the code is the status name, so branch on the status first and on the code only for the values below. RATE_LIMITED is a 429 from a request-rate ceiling and clears within the window. BATCH_TOO_LARGE means the batch exceeded the documented item cap — split and retry. TIMESTAMP_OUT_OF_WINDOW means the instant requested lies outside the 7-day coverage window or more than 5 minutes in the future.
  - Allowed values: `BAD_REQUEST`, `BATCH_TOO_LARGE`, `TIMESTAMP_OUT_OF_WINDOW`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `PAYLOAD_TOO_LARGE`, `RATE_LIMITED`, `SERVICE_UNAVAILABLE`
- `message` (string, required)

## Examples

**Response**

```json
{
  "used": 1240,
  "limit": null,
  "available": null,
  "unlimited": true,
  "interval": 30,
  "timeUnit": "day",
  "expiry": null
}
```

**SDK Code**

```python
import requests

url = "https://epg-api.pixalate.com/v1/enrich"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://epg-api.pixalate.com/v1/enrich';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://epg-api.pixalate.com/v1/enrich"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://epg-api.pixalate.com/v1/enrich")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://epg-api.pixalate.com/v1/enrich")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://epg-api.pixalate.com/v1/enrich', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://epg-api.pixalate.com/v1/enrich");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://epg-api.pixalate.com/v1/enrich")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```