Account
Inspect the account associated with an API key.
Get account
GET /v1/me
Return the account, plan limits, and usage for the API key. Any valid API key can call this endpoint. You may also omit Authorization to check whether the request is unauthenticated.
Authentication
No header is required for the unauthenticated response. When you send Authorization, use a valid API key.
Response fields
For an authenticated key:
| Field | Type | Description |
|---|---|---|
type | string | Always account. |
id | string | Organization ID. |
authenticated | boolean | Always true in the authenticated response. |
default_project | string | Default project name, or default when no default project is set. |
plan | string | free, starter, developer, pro, or unknown. |
limits.storage_bytes | integer or null | Hard storage limit. null means no hard cap or an unknown plan. |
limits.included_storage_bytes | integer or null | Included storage for the plan. |
limits.max_file_bytes | null | Always null in this response. |
limits.max_batch_files | integer | Always 25. |
limits.max_batch_bytes | integer | Always 104857600 (100 MiB). |
usage | object or null | Organization usage when the key has organization-level read; otherwise null. |
usage.size_bytes | integer | Bytes in ready and uploading files. |
usage.file_count | integer | Count of ready and uploading files. |
Without Authorization, return only type, authenticated, and next.
Returns 200 OK.
Request
curl https://agentfs.cloud/v1/me \
-H "Authorization: Bearer $AGENTFS_KEY"Response
{
"type": "account",
"id": "org_1a2b",
"authenticated": true,
"default_project": "reports",
"plan": "developer",
"limits": {
"storage_bytes": 107374182400,
"included_storage_bytes": 107374182400,
"max_file_bytes": null,
"max_batch_files": 25,
"max_batch_bytes": 104857600
},
"usage": {
"size_bytes": 482130,
"file_count": 12
}
}An unauthenticated request returns:
{
"type": "account",
"authenticated": false,
"next": "Call POST /v1/auth/device to connect an agent."
}Errors
unauthorized (401), invalid_agent_label (400), internal_error (500).
AgentFS