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

# Retrieve account usage and billing status

GET https://api.segmentationapi.com/v1/account/overview

Reference: https://docs.segmentationapi.com/api-reference/account/get-account-overview

## Authentication

- `Authorization` header (required) — Unrestricted secret `sk_live_...` or Cognito access token in `Authorization: Bearer ...`

## Response

### 200

Overview

- `tokenUsageLast24h` (integer, required)
- `billing` (BillingOverview, required)
- `access` (AccessOverview, required)
- `trial` (TrialOverview, required)

## Errors

### 401 Unauthorized Error

Authentication is missing, invalid, or expired

- `error` (string, required)
- `message` (string, optional)
- `remainingTokens` (integer, optional)
- `requestedTokens` (integer, optional)
- `expiresAt` (datetime, optional)
- `activeJobId` (string, optional)
- `upgradeUrl` (string, optional)
- `retryAfterSeconds` (integer, optional)

## Types

### BillingOverview

- `accessStatus` (string, optional)
- `currentPeriodEnd` (string, optional)
- `latestInvoiceStatus` (string, optional)
- `stripeSubscriptionStatus` (string, optional)

### AccessOverview

- `mode` (enum, required)
  - Allowed values: `paid`, `trial`, `blocked`
- `reason` (enum, required)
  - Allowed values: `paid_access`, `trial_eligible`, `trial_active`, `trial_exhausted`, `trial_expired`, `billing_delinquent`
- `canCreateJobs` (boolean, required)
- `videoAllowed` (boolean, required)
- `downloadsAllowed` (boolean, required)
- `maxImageTasksPerJob` (integer, required)
- `maxActiveJobs` (integer, required)

### TrialOverview

- `offerVersion` (string, required)
- `status` (enum, required)
  - Allowed values: `eligible`, `active`, `exhausted`, `expired`
- `grantTokens` (integer, required)
- `consumedTokens` (integer, required)
- `remainingTokens` (integer, required)
- `durationDays` (integer, required)
- `startedAt` (datetime, required, nullable)
- `expiresAt` (datetime, required, nullable)
- `activeJobId` (string, required, nullable)

## Examples

**Response**

```json
{
  "tokenUsageLast24h": 1,
  "billing": {
    "accessStatus": "string",
    "currentPeriodEnd": "string",
    "latestInvoiceStatus": "string",
    "stripeSubscriptionStatus": "string"
  },
  "access": {
    "mode": "paid",
    "reason": "paid_access",
    "canCreateJobs": true,
    "videoAllowed": true,
    "downloadsAllowed": true,
    "maxImageTasksPerJob": 1,
    "maxActiveJobs": 1
  },
  "trial": {
    "offerVersion": "string",
    "status": "eligible",
    "grantTokens": 1,
    "consumedTokens": 1,
    "remainingTokens": 1,
    "durationDays": 1,
    "startedAt": "2024-01-15T09:30:00Z",
    "expiresAt": "2024-01-15T09:30:00Z",
    "activeJobId": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.segmentationapi.com/v1/account/overview"

headers = {"Authorization": "<apiKey>"}

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

print(response.json())
```

```javascript
const url = 'https://api.segmentationapi.com/v1/account/overview';
const options = {method: 'GET', headers: {Authorization: '<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://api.segmentationapi.com/v1/account/overview"

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

	req.Header.Add("Authorization", "<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://api.segmentationapi.com/v1/account/overview")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<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://api.segmentationapi.com/v1/account/overview")
  .header("Authorization", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.segmentationapi.com/v1/account/overview', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.segmentationapi.com/v1/account/overview");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.segmentationapi.com/v1/account/overview")! 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()
```