> For the complete documentation index, see [llms.txt](https://docs.auray.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.auray.ai/api-reference/account.md).

# Account

Who you are and what you have spent.

## GET /me

> Who this key belongs to

```json
{"openapi":"3.1.0","info":{"title":"Auray API","version":"1.0.0"},"tags":[{"name":"Account","description":"Who you are and what you have spent."}],"servers":[{"url":"https://api.auray.ai/v1"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"auray_sk_","description":"Create one in Settings -> API Keys. Seventy-one characters: auray_sk_, a public twelve-character id, an underscore, and a secret we store only as a one-way hash. Every key expires; the maximum life is 366 days."}},"schemas":{"Scope":{"type":"string","enum":["jobs:read","assets:read","photo:write","music:write","video:write","threed:write","chat:write","webhooks:write"],"description":"There is deliberately no scope for managing keys."},"Error":{"type":"object","required":["error","message","request_id"],"properties":{"error":{"type":"string","description":"For your code."},"message":{"type":"string","description":"A sentence, for a human reading a log."},"docs":{"type":"string"},"request_id":{"type":"string","description":"Quote this if you write in."}}}},"responses":{"Error":{"description":"Refused. See `error` for the machine-readable code.","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/me":{"get":{"summary":"Who this key belongs to","operationId":"getMe","tags":["Account"],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Burst capacity."},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until refill."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix seconds. The X- spelling is what client libraries read."},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["account"]},"id":{"type":"string","format":"uuid"},"plan":{"type":"string","enum":["free","pro","max","ultimate"]},"credits":{"type":"object","properties":{"balance":{"type":["integer","null"],"description":"Null when no wallet row was read for this account. 0 means the row exists and currently holds nothing — which includes a free account, whose monthly allowance is zero and whose row is created holding it. So null and 0 are different states, but 0 does not by itself mean credits were spent. GET /usage coalesces the same value and can never answer null."},"monthly_allowance":{"type":"integer"},"period":{"type":"string"}}},"key":{"type":"object","properties":{"id":{"type":"string","description":"The public 12 characters."},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/Scope"}},"credit_ceiling":{"type":"integer","description":"0 means no per-key cap."},"credits_spent_period":{"type":"integer"}}}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"description":"`browser_origin_refused` — the request carried an `Origin` header. Every route on this surface answers this before it reads the key; `/usage` already documented it and this did not.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}}}}
```

## Where the credits went this month

> By product AND by origin, so an operator can tell their script from their team's browser. Origin is read from the debit that paid for a job: a refund does not record which surface made it.

```json
{"openapi":"3.1.0","info":{"title":"Auray API","version":"1.0.0"},"tags":[{"name":"Account","description":"Who you are and what you have spent."}],"servers":[{"url":"https://api.auray.ai/v1"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"auray_sk_","description":"Create one in Settings -> API Keys. Seventy-one characters: auray_sk_, a public twelve-character id, an underscore, and a secret we store only as a one-way hash. Every key expires; the maximum life is 366 days."}},"responses":{"Error":{"description":"Refused. See `error` for the machine-readable code.","headers":{"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error","message","request_id"],"properties":{"error":{"type":"string","description":"For your code."},"message":{"type":"string","description":"A sentence, for a human reading a log."},"docs":{"type":"string"},"request_id":{"type":"string","description":"Quote this if you write in."}}}}},"paths":{"/usage":{"get":{"summary":"Where the credits went this month","description":"By product AND by origin, so an operator can tell their script from their team's browser. Origin is read from the debit that paid for a job: a refund does not record which surface made it.","operationId":"getUsage","tags":["Account"],"responses":{"200":{"description":"OK","headers":{"RateLimit-Limit":{"schema":{"type":"integer"},"description":"Burst capacity."},"RateLimit-Remaining":{"schema":{"type":"integer"}},"RateLimit-Reset":{"schema":{"type":"integer"},"description":"Seconds until refill."},"X-RateLimit-Limit":{"schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer"}},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix seconds. The X- spelling is what client libraries read."},"X-Request-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["usage"]},"period":{"type":"string"},"credits":{"type":"object","properties":{"balance":{"type":"integer"},"monthly_allowance":{"type":"integer"},"spent_this_period":{"type":"integer"},"refunded_this_period":{"type":"integer"},"net_this_period":{"type":"integer"}}},"by_product":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string","enum":["photo","music","video","threed","chat","code"],"description":"Wider than the Product enum used elsewhere, and deliberately so: usage sums the whole shared credit ledger, and the desktop's Code product charges it too. There is no POST /v1/code — `code` can be spent, but not submitted from this API."},"origin":{"type":"string","enum":["api","app"],"description":"Whether the credits went to a script or to the desktop. The ledger column allows exactly these two; `ui` is the jobs tables' word for the same thing and never reaches this field."},"spent":{"type":"integer"},"refunded":{"type":"integer"},"net":{"type":"integer"},"jobs":{"type":"integer"}}}},"keys":{"type":"array","items":{"type":"object"}},"rate_limits":{"type":"object"},"note":{"type":"string","description":"The caveat that belongs beside these figures: `origin` is taken from the debit that paid for a job, because a refund does not record which surface made it, and the numbers cover the current calendar month."}}}}}},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.auray.ai/api-reference/account.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
