---
agentTools:
  projectIndex: https://elai.readme.io/llms.txt
---

# Get the current user, workspace and plan

Returns the authenticated identity together with the workspace and organization it belongs to — plan, minute balance, seat limit, brand kits, pronunciation dictionary and the workspace's current usage limits.

With an API token this describes the **workspace admin the token resolves to**, not a caller of your own. It is the quickest way to check remaining minutes (`organization.minutesAvailable` / `minutesUsed`) before kicking off renders.

Returns `401` — not `403` — when the resolved user no longer belongs to the workspace.

```curl Request
curl -X GET 'https://apis.elai.io/api/v1/users/me' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Elai Public API",
    "version": "1.0",
    "description": "Every endpoint below is served under `https://apis.elai.io/api/v1`.\n\n## Authentication\n\nSend your workspace API token as a bearer token on every request:\n\n```\nAuthorization: Bearer <your-api-token>\n```\n\nGenerate and rotate the token in the Elai web app under **Settings → API**, or through\n`POST /generateToken`. The token is scoped to one **workspace** and authenticates as that\nworkspace's admin user — it is not tied to an individual person, and it carries admin rights\ninside that workspace.\n\nA request with a missing, unknown or revoked token gets a bare `401` with no response body.\n\n> **Organizations on the Unlimited plan cannot use the API.** Their requests are rejected with the\n> same bare `401` as an invalid token, with nothing to distinguish the two. If a valid, freshly\n> generated token returns `401` on every endpoint, check the plan first.\n\n## Errors\n\nFailures carry a JSON body of the shape `{ \"message\": \"...\" }`. Validation failures on the newer\nendpoints may add an `errors` array naming the offending fields. `401` is the exception: it has no\nbody at all.\n\nBoth render endpoints are **fire-and-forget** — they queue work and return immediately, so a\n`200` means \"accepted\", not \"rendered\". Render failures surface only through the `video_error`\nwebhook, never as an HTTP error on the call that started the render.\n\n## Scope\n\nThis reference is generated from the running code rather than maintained by hand, so it cannot\nquietly fall behind the API it describes. It documents 96 operations across the\n`/api/v1` surface.\n\nEndpoints are grouped by subject in the sidebar. If something you need is missing, or an endpoint\ndoes not behave as described here, tell us.\n\n---\n\n_Generated from `chore/web-4760/api-v1-reference-build` at `5289745d` on 2026-09-04._"
  },
  "servers": [
    {
      "url": "https://apis.elai.io/api/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer",
        "x-default": "SECRET_KEY"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Human-readable explanation of the failure."
          }
        }
      },
      "CurrentUser": {
        "type": "object",
        "description": "The authenticated user with its workspace and organization context.",
        "properties": {
          "userId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "status": {
            "type": "string"
          },
          "accountRole": {
            "type": "string",
            "description": "Role in the current workspace (`admin`, `user`, `locked`, `reviewer`)."
          },
          "orgRole": {
            "type": "string",
            "description": "Role in the organization (`admin` or `user`)."
          },
          "accounts": {
            "type": "array",
            "description": "Every workspace the user belongs to.",
            "items": {
              "type": "object",
              "properties": {
                "_id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "personal": {
                  "type": "boolean"
                },
                "minutesAvailable": {
                  "type": "number"
                },
                "minutesUsed": {
                  "type": "number"
                }
              }
            }
          },
          "organization": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "plan": {
                "type": "string",
                "description": "Plan name. Note that `unlimited` organizations are blocked from the API entirely."
              },
              "planVariant": {
                "type": "string"
              },
              "billingCycle": {
                "type": "string"
              },
              "minutesUsed": {
                "type": "number"
              },
              "minutesAvailable": {
                "type": "number"
              },
              "extraMinutes": {
                "type": "number"
              },
              "maxSeats": {
                "type": "integer"
              },
              "allowOverlimit": {
                "type": "boolean"
              },
              "premiumAvatarsAllowed": {
                "type": "boolean"
              },
              "hasStripe": {
                "type": "boolean"
              },
              "planStartedAt": {
                "type": "string",
                "format": "date-time"
              },
              "planCancelAtPeriodEnd": {
                "type": "boolean"
              },
              "planCancelsAt": {
                "type": "string",
                "format": "date-time"
              }
            },
            "additionalProperties": true
          },
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "personal": {
                "type": "boolean"
              },
              "hasApi": {
                "type": "boolean",
                "description": "Whether an API token exists for this workspace."
              },
              "brandKits": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "_id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "colors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "defaultLogoPlacement": {
                      "type": "string"
                    }
                  }
                }
              },
              "dictionary": {
                "type": "array",
                "description": "Pronunciation overrides applied during TTS.",
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "word": {
                      "type": "string"
                    },
                    "pronunciation": {
                      "type": "string"
                    },
                    "language": {
                      "type": "string"
                    },
                    "voice": {
                      "type": "string"
                    }
                  }
                }
              },
              "llmUsageCounters": {
                "type": "object",
                "additionalProperties": true
              }
            },
            "additionalProperties": true
          }
        }
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/users/me": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get the current user, workspace and plan",
        "description": "Returns the authenticated identity together with the workspace and organization it belongs to — plan, minute balance, seat limit, brand kits, pronunciation dictionary and the workspace's current usage limits.\n\nWith an API token this describes the **workspace admin the token resolves to**, not a caller of your own. It is the quickest way to check remaining minutes (`organization.minutesAvailable` / `minutesUsed`) before kicking off renders.\n\nReturns `401` — not `403` — when the resolved user no longer belongs to the workspace.",
        "responses": {
          "200": {
            "description": "The current user, workspace and organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentUser"
                }
              }
            }
          },
          "401": {
            "description": "The user is no longer a member of the workspace, or the workspace does not belong to the organization.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "operationId": "retrieve-current-user"
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "tags": [
    {
      "name": "Users",
      "description": "Workspace membership, and the identity your token resolves to."
    }
  ],
  "_id": {
    "buffer": {
      "0": 106,
      "1": 154,
      "2": 229,
      "3": 101,
      "4": 201,
      "5": 178,
      "6": 243,
      "7": 252,
      "8": 223,
      "9": 58,
      "10": 69,
      "11": 151
    }
  }
}
````