Generator

Menu

AI GeneratorImages, video, audio and 3D

Browse categories

Docs menu
Account

API reference

Account

The account behind the key or token.

View as Markdown
For your agent https://imgsearch.com/llms.txt
On this page
GET /account

The account behind the key or token, and the connection itself #

  • account
  • account:read

Responses

Examples

curl
# The account behind the key, and the key itself.
# Needs IMGSEARCH_API_KEY.
curl -sS \
  "${IMGSEARCH_API_BASE:-https://imgsearch.com/api/v2}/account" \
  -H "Authorization: Bearer $IMGSEARCH_API_KEY"
Python
# The account behind the key, and the key itself.
# Needs IMGSEARCH_API_KEY.
import json
import os

import httpx

base = os.environ.get("IMGSEARCH_API_BASE", "https://imgsearch.com/api/v2")
headers = {"Authorization": f"Bearer {os.environ['IMGSEARCH_API_KEY']}"}

r = httpx.get(f"{base}/account", headers=headers, timeout=60)
print(r.status_code)
print(json.dumps(r.json(), indent=2))
JavaScript
// The account behind the key, and the key itself.
// Needs IMGSEARCH_API_KEY.
const base = process.env.IMGSEARCH_API_BASE ?? "https://imgsearch.com/api/v2";

const r = await fetch(`${base}/account`, { headers: { Authorization: `Bearer ${process.env.IMGSEARCH_API_KEY}` } });
console.log(r.status);
console.log(JSON.stringify(await r.json(), null, 2));
Response 200
{
    "object": "account",
    "id": "usr_7004e9fd785c5cf2",
    "email": "you@example.com",
    "email_verified": true,
    "plan": {
        "key": "infinite",
        "name": "Complimentary"
    },
    "adult_confirmed": true,
    "can_generate": true,
    "generate_blocked_reason": null,
    "connection": {
        "type": "api_key",
        "name": "Examples replay",
        "scopes": [
            "search",
            "download",
            "generations:read",
            "generations:write",
            "account:read",
            "webhooks",
            "generate"
        ],
        "created_at": "2026-11-26T09:45:23Z",
        "expires_at": "2026-12-26T09:45:23Z",
        "spending_enabled": true,
        "monthly_cap_usd": 2,
        "spent_this_month_usd": 0.182,
        "resets_at": "2026-12-01T00:00:00Z"
    }
}
Try it

The try-it panel needs JavaScript.

GET /account/balance

The AI balance in US dollars, by source and lot #

  • account.balance
  • account:read

Reading it settles lots that are due (expiries and yearly instalments), as the account page does.

Responses

Examples

curl
# The AI balance in US dollars, by source and lot.
# Needs IMGSEARCH_API_KEY.
curl -sS \
  "${IMGSEARCH_API_BASE:-https://imgsearch.com/api/v2}/account/balance" \
  -H "Authorization: Bearer $IMGSEARCH_API_KEY"
Python
# The AI balance in US dollars, by source and lot.
# Needs IMGSEARCH_API_KEY.
import json
import os

import httpx

base = os.environ.get("IMGSEARCH_API_BASE", "https://imgsearch.com/api/v2")
headers = {"Authorization": f"Bearer {os.environ['IMGSEARCH_API_KEY']}"}

r = httpx.get(f"{base}/account/balance", headers=headers, timeout=60)
print(r.status_code)
print(json.dumps(r.json(), indent=2))
JavaScript
// The AI balance in US dollars, by source and lot.
// Needs IMGSEARCH_API_KEY.
const base = process.env.IMGSEARCH_API_BASE ?? "https://imgsearch.com/api/v2";

const r = await fetch(`${base}/account/balance`, { headers: { Authorization: `Bearer ${process.env.IMGSEARCH_API_KEY}` } });
console.log(r.status);
console.log(JSON.stringify(await r.json(), null, 2));
Response 200
{
    "object": "balance",
    "available_usd": 0.604,
    "held_usd": 0,
    "held_reason": null,
    "by_source_usd": {
        "plan": 0,
        "gift": 0,
        "top_up": 0.604
    },
    "lots": [
        {
            "source": "top_up",
            "amount_usd": 0.604,
            "available_at": "2026-11-08T16:02:16Z",
            "expires_at": "2028-11-08T16:02:16Z",
            "on_hold": false
        }
    ],
    "next_grant": null
}
Try it

The try-it panel needs JavaScript.

GET /account/balance/transactions

The AI balance's ledger in US dollars, newest first #

  • account.transactions
  • account:read

Parameters

NameInTypeDescription
direction query string One of: credit, debit
limit query integer Items per page.
cursor query string The next_cursor of the previous page, as it came. It works only for the same list, filter and account.

Responses

Examples

curl
# The last five debits of the AI balance ledger.
# Needs IMGSEARCH_API_KEY.
curl -sS \
  "${IMGSEARCH_API_BASE:-https://imgsearch.com/api/v2}/account/balance/transactions?direction=debit&limit=5" \
  -H "Authorization: Bearer $IMGSEARCH_API_KEY"
Python
# The last five debits of the AI balance ledger.
# Needs IMGSEARCH_API_KEY.
import json
import os

import httpx

base = os.environ.get("IMGSEARCH_API_BASE", "https://imgsearch.com/api/v2")
headers = {"Authorization": f"Bearer {os.environ['IMGSEARCH_API_KEY']}"}

r = httpx.get(
    f"{base}/account/balance/transactions",
    headers=headers,
    params={"direction": "debit", "limit": 5},
    timeout=60,
)
print(r.status_code)
print(json.dumps(r.json(), indent=2))
JavaScript
// The last five debits of the AI balance ledger.
// Needs IMGSEARCH_API_KEY.
const base = process.env.IMGSEARCH_API_BASE ?? "https://imgsearch.com/api/v2";

const r = await fetch(`${base}/account/balance/transactions?direction=debit&limit=5`, {
  headers: { Authorization: `Bearer ${process.env.IMGSEARCH_API_KEY}` },
});
console.log(r.status);
console.log(JSON.stringify(await r.json(), null, 2));
Response 200
{
    "object": "list",
    "data": [
        {
            "object": "balance_transaction",
            "id": "ctx_d66c5ca1206947be",
            "direction": "debit",
            "amount_usd": 0.01,
            "balance_after_usd": 0.594,
            "reason": "AI Generator: Image",
            "source": "generation",
            "refunded": true,
            "refund_of": null,
            "created_at": "2026-11-26T11:45:29Z",
            "job": {
                "type": "generation",
                "id": "01m8bkxvdyfespxd9sbk178hkr"
            }
        },
        {
            "object": "balance_transaction",
            "id": "ctx_b696eda286414952",
            "direction": "debit",
            "amount_usd": 0.01,
            "balance_after_usd": 0.604,
            "reason": "AI Generator: Image",
            "source": "generation",
            "refunded": false,
            "refund_of": null,
            "created_at": "2026-11-26T11:45:29Z",
            "job": {
                "type": "generation",
                "id": "01m8bkxtwgssxsn1ed6e65jnza"
            }
        },
        {
            "object": "balance_transaction",
            "id": "ctx_ced81b22e73d7a89",
            "direction": "debit",
            "amount_usd": 0.006,
            "balance_after_usd": 0.608,
            "reason": "AI Generator: Image",
            "source": "generation",
            "refunded": true,
            "refund_of": null,
            "created_at": "2026-11-26T11:45:28Z",
            "job": {
                "type": "generation",
                "id": "01m8bkxt07eds5vxbad257azj0"
            }
        },
        {
            "object": "balance_transaction",
            "id": "ctx_370722fa702fb1fd",
            "direction": "debit",
            "amount_usd": 0.01,
            "balance_after_usd": 0.614,
            "reason": "AI Generator: Image",
            "source": "generation",
            "refunded": false,
            "refund_of": null,
            "created_at": "2026-11-26T11:45:27Z",
            "job": {
                "type": "generation",
                "id": "01m8bkxs9212pmc6h2hzwnys3s"
            }
        },
        {
            "object": "balance_transaction",
            "id": "ctx_eff8dde049fb20e5",
            "direction": "debit",
            "amount_usd": 0.1,
            "balance_after_usd": 0.624,
            "reason": "AI Generator: 3D model",
            "source": "generation",
            "refunded": false,
            "refund_of": null,
            "created_at": "2026-11-26T11:45:23Z",
            "job": {
                "type": "generation",
                "id": "01m8bkxnmvbtztw64v4jc0b3jb"
            }
        }
    ],
    "has_more": true,
    "next_cursor": "EXAMPLE-CURSOR"
}
Try it

The try-it panel needs JavaScript.

GET /account/limits

How the account stands against its limits right now #

  • account.limits
  • account:read

Statuses only, no ceilings: search and downloads read limited only while an enforced limit is full, with the seconds until it opens again.

Responses

Examples

curl
# How the account stands against its limits right now.
# Needs IMGSEARCH_API_KEY.
curl -sS \
  "${IMGSEARCH_API_BASE:-https://imgsearch.com/api/v2}/account/limits" \
  -H "Authorization: Bearer $IMGSEARCH_API_KEY"
Python
# How the account stands against its limits right now.
# Needs IMGSEARCH_API_KEY.
import json
import os

import httpx

base = os.environ.get("IMGSEARCH_API_BASE", "https://imgsearch.com/api/v2")
headers = {"Authorization": f"Bearer {os.environ['IMGSEARCH_API_KEY']}"}

r = httpx.get(f"{base}/account/limits", headers=headers, timeout=60)
print(r.status_code)
print(json.dumps(r.json(), indent=2))
JavaScript
// How the account stands against its limits right now.
// Needs IMGSEARCH_API_KEY.
const base = process.env.IMGSEARCH_API_BASE ?? "https://imgsearch.com/api/v2";

const r = await fetch(`${base}/account/limits`, { headers: { Authorization: `Bearer ${process.env.IMGSEARCH_API_KEY}` } });
console.log(r.status);
console.log(JSON.stringify(await r.json(), null, 2));
Response 200
{
    "object": "limits",
    "requests": {
        "limit": 600,
        "remaining": 549,
        "reset_seconds": 42
    },
    "search": {
        "status": "ok",
        "retry_after_seconds": null
    },
    "downloads": {
        "status": "ok",
        "retry_after_seconds": null
    },
    "fair_use": {
        "status": "ok",
        "videos_status": "ok",
        "resets_at": "2026-12-07T14:57:00Z"
    },
    "generations": {
        "active": 0,
        "max_active": 4,
        "running_max": 2
    }
}
Try it

The try-it panel needs JavaScript.

GET /account/savings

What this account's agents reused instead of generating #

  • account.savings
  • account:read

What this account's agents reused instead of generating in one calendar month (UTC). A result counts when an API search showed it and the same account then downloaded it through the API or a connector within 24 hours, once per item a day. The estimate is the default model's price for that kind at the time of the search, one output; it covers only reuses the account could have paid for (a paid plan or bought AI balance) and never changes the balance. Brands and sound effects never count. Website downloads never count.

Parameters

NameInTypeDescription
month query string A calendar month in UTC, this one or an earlier one; this month when left out.

Responses

Examples

curl
# What this account's agents reused this month instead of generating.
# Needs IMGSEARCH_API_KEY.
curl -sS \
  "${IMGSEARCH_API_BASE:-https://imgsearch.com/api/v2}/account/savings" \
  -H "Authorization: Bearer $IMGSEARCH_API_KEY"
Python
# What this account's agents reused this month instead of generating.
# Needs IMGSEARCH_API_KEY.
import json
import os

import httpx

base = os.environ.get("IMGSEARCH_API_BASE", "https://imgsearch.com/api/v2")
headers = {"Authorization": f"Bearer {os.environ['IMGSEARCH_API_KEY']}"}

r = httpx.get(f"{base}/account/savings", headers=headers, timeout=60)
print(r.status_code)
print(json.dumps(r.json(), indent=2))
JavaScript
// What this account's agents reused this month instead of generating.
// Needs IMGSEARCH_API_KEY.
const base = process.env.IMGSEARCH_API_BASE ?? "https://imgsearch.com/api/v2";

const r = await fetch(`${base}/account/savings`, { headers: { Authorization: `Bearer ${process.env.IMGSEARCH_API_KEY}` } });
console.log(r.status);
console.log(JSON.stringify(await r.json(), null, 2));
Response 200
{
    "object": "savings",
    "month": "2026-11",
    "starts_at": "2026-11-01T00:00:00Z",
    "ends_at": "2026-12-01T00:00:00Z",
    "recording": false,
    "reuses": 0,
    "estimated_reuses": 0,
    "estimated_usd": null,
    "by_source": {
        "photo": {
            "reuses": 0,
            "estimated_usd": null
        },
        "video": {
            "reuses": 0,
            "estimated_usd": null
        },
        "svg": {
            "reuses": 0,
            "estimated_usd": null
        },
        "svg_pack": {
            "reuses": 0,
            "estimated_usd": null
        },
        "3d_model": {
            "reuses": 0,
            "estimated_usd": null
        },
        "3d_kit": {
            "reuses": 0,
            "estimated_usd": null
        },
        "generation": {
            "reuses": 0,
            "estimated_usd": null
        }
    }
}
Try it

The try-it panel needs JavaScript.