Answer: Set `CURSOR_API_KEY` (or pass `apiKey`) before creating an agent; for interactive hosts without a pre-provisioned key, `Cursor.auth.login()` mints and stores one through a browser login. The SDK accepts user API keys and service account API keys for both local and cloud runs, but Team Admin API keys are not yet supported. Status: Confirmed Entry: tool/cursor/account-and-plans/sdk-authentication Revision: 1 Digest: sha256:9b7dced82fadc45e (changes whenever the content changes) Timeline: Created: 2026-11-13T03:12:08Z Last changed: 2026-11-13T03:12:08Z Last verified: 2026-11-20T12:40:53Z Next check: 2026-11-21T12:40:53Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Environment variable | CURSOR_API_KEY | [1] | 2026-11-20 Alternative parameter | apiKey | [1] | 2026-11-20 Supported key types | user API keys and service account API keys | [1] | 2026-11-20 Unsupported key type | Team Admin API keys | [1] | 2026-11-20 Sources: [1] Anysphere. "cursor.com/docs/sdk/typescript.md". https://cursor.com/docs/sdk/typescript.md Role: primary. Accessed: 2026-11-20T12:40:53Z Quote: "Set `CURSOR_API_KEY` (or pass `apiKey`) before creating an agent." (Supports: Environment variable, Alternative parameter) Quote: "The SDK accepts user API keys and service account API keys for both local and cloud runs." (Supports: Supported key types) Quote: "Team Admin API keys are not yet supported." (Supports: Unsupported key type) Snapshot SHA-256: c9e134cfe90fbd451316dd97f8a332e7e6c2a1c159e3491a2b03d32790252bf2 (captured 2026-11-13T03:12:08Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T03:12:08Z, so the values verified then were kept. Cross-check: not-available at 2026-11-20T12:40:53Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:40:53Z Last attempt: 2026-11-20T12:40:53Z Notes and limitations: Extracted automatically from a single official source (section "Authentication"). Related: https://latestn.com/tool/cursor/account-and-plans/service-account-seat-cost Do Cursor service accounts require an additional seat or cost extra? https://latestn.com/tool/cursor/account-and-plans/sign-in-origin-cli How do I sign in to the Cursor Origin CLI? https://latestn.com/tool/cursor/account-and-plans/sso-plan-availability Which Cursor plans include SAML 2.0 SSO? https://latestn.com/tool/cursor/account-and-plans/roles-seat-tiers What are the different roles and seat tiers in Cursor Teams? https://latestn.com/tool/cursor/account-and-plans/rollouts-plan-availability Which Cursor plans include Rollouts? https://latestn.com/tool/cursor/account-and-plans/router-plan-availability Which Cursor plans include Cursor Router? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T03:12:08Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/cursor/account-and-plans/sdk-authentication/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/cursor/account-and-plans/sdk-authentication POST: https://latestn.com/dispute/tool/cursor/account-and-plans/sdk-authentication with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/cursor/account-and-plans/sdk-authentication?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I authenticate the Cursor TypeScript SDK? Revision 1, last verified 2026-11-20T12:40:53Z. https://latestn.com/tool/cursor/account-and-plans/sdk-authentication (accessed 2026-11-21T10:02:33Z). @misc{LatestN_tool_cursor_account_and_plans_sdk_authentication_r1, title = {How do I authenticate the Cursor TypeScript SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/cursor/account-and-plans/sdk-authentication}}, note = {Revision 1; digest sha256:9b7dced82fadc45e; last verified 2026-11-20T12:40:53Z; accessed 2026-11-21T10:02:33Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/cursor/account-and-plans/sdk-authentication