The calling key's plan, current-period usage, and keys
const url = 'https://api.legesher.io/v1/me';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.legesher.io/v1/meDescribe the caller: effective tier, month-to-date usage, key list.
Requires an API key: a caller without one gets the same generic 401 as an invalid key. Key entries carry hash prefixes and lifecycle metadata only; key material is never returned by any endpoint after mint time.
Responses
Section titled “ Responses ”Successful Response
The caller’s plan, current-period usage, and key metadata.
object
Keys in the caller’s scope (the account’s, or just this one).
Metadata for one API key in the caller’s scope. Never the key itself.
object
False once revoked.
First 12 hex characters of the key’s stored SHA-256 hash: an identifier, not a secret, and not derivable back to the key.
The plan the key was created on.
The caller’s effective plan: the subscription’s plan when one is active, else the plan the key was created on.
object
Tier id, e.g. ‘individual’.
The limits of the caller’s plan.
A null value means the plan sets no fixed limit for that measure.
object
Display name, e.g. ‘Individual’.
‘enhanced’ when the plan includes enhanced translation.
Billed character usage for the current UTC month.
Reads the same meter the quota is enforced against, so these numbers
always agree with the X-Usage-Characters-* response headers. For a
key that belongs to an account this is the account’s shared total:
every key the account created draws on one budget.
object
Characters billed so far this period.
End of the window (exclusive): the monthly reset moment.
Start of the UTC month window.
Example generated
{ "account_subject": "example", "keys": [ { "created_at": "2026-04-15T12:00:00Z", "is_active": true, "key_hash_prefix": "example", "last_used": "2026-04-15T12:00:00Z", "tier": "example" } ], "tier": { "id": "example", "limits": { "api_keys": 1, "monthly_chars": 1, "requests_per_minute": 1 }, "name": "example", "translation_mode": "example" }, "usage_this_period": { "chars_remaining": 1, "chars_used": 1, "period_end": "2026-04-15T12:00:00Z", "period_start": "2026-04-15T12:00:00Z" }}Headers
Section titled “ Headers ”Requests permitted per minute for the caller’s tier. The X-RateLimit-* set is omitted when the tier’s rate is unlimited, and on a request refused before the caller is identified.
Requests remaining in the current rate window.
Seconds until the rate limit fully resets.
Correlation id for this request: the validated inbound X-Request-ID when one was sent, else a server-minted UUID.
Characters left in the caller’s monthly budget.
Characters billed against the caller’s monthly budget, UTC month to date. The X-Usage-* pair is omitted when the budget is unlimited, and on a request refused before the caller is identified.
The API key is missing or not valid.
Envelope for every error response.
object
Machine-readable code + human message for one error.
object
Machine-readable error code, e.g. ‘validation_error’, ‘unsupported_language’, ‘language_pack_not_found’, ‘payload_too_large’, ‘foundation_unavailable’, ‘invalid_source_code’, ‘internal_error’.
Per-field breakdown (validation errors only).
One request-validation problem, stripped of the submitted input.
object
Dotted location of the offending field.
Human-readable description.
Pydantic error type identifier.
Human-readable explanation.
Example generated
{ "error": { "code": "example", "details": [ { "field": "example", "message": "example", "type": "example" } ], "message": "example" }}Headers
Section titled “ Headers ”Correlation id for this request: the validated inbound X-Request-ID when one was sent, else a server-minted UUID.
Too many requests.
Envelope for every error response.
object
Machine-readable code + human message for one error.
object
Machine-readable error code, e.g. ‘validation_error’, ‘unsupported_language’, ‘language_pack_not_found’, ‘payload_too_large’, ‘foundation_unavailable’, ‘invalid_source_code’, ‘internal_error’.
Per-field breakdown (validation errors only).
One request-validation problem, stripped of the submitted input.
object
Dotted location of the offending field.
Human-readable description.
Pydantic error type identifier.
Human-readable explanation.
Example generated
{ "error": { "code": "example", "details": [ { "field": "example", "message": "example", "type": "example" } ], "message": "example" }}Headers
Section titled “ Headers ”Seconds to wait before retrying. Usually sent with rate_limited; absent on quota_exceeded, which lasts until the UTC month resets.
Requests permitted per minute for the caller’s tier. The X-RateLimit-* set is omitted when the tier’s rate is unlimited, and on a request refused before the caller is identified.
Requests remaining in the current rate window.
Seconds until the rate limit fully resets.
Correlation id for this request: the validated inbound X-Request-ID when one was sent, else a server-minted UUID.
Characters left in the caller’s monthly budget.
Characters billed against the caller’s monthly budget, UTC month to date. The X-Usage-* pair is omitted when the budget is unlimited, and on a request refused before the caller is identified.