Answer: Set `CURSOR_API_KEY` or pass `api_key` before creating an agent. 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/install-and-setup/sdk-authentication Revision: 1 Digest: sha256:d1a2e5a785d5ee82 (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:49Z Next check: 2026-11-21T12:40:49Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of Authentication method | CURSOR_API_KEY | [1] | 2026-11-20 Alternative parameter | api_key | [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 Environment variable example | your-key | [1] | 2026-11-20 Sources: [1] Anysphere. "cursor.com/docs/sdk/python.md". https://cursor.com/docs/sdk/python.md Role: primary. Accessed: 2026-11-20T12:40:49Z Quote: "Set `CURSOR_API_KEY` or pass `api_key` before creating an agent." (Supports: Authentication method, 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) Quote: "export CURSOR_API_KEY="your-key"" (Supports: Environment variable example) Snapshot SHA-256: 7f116c85cadb25c7ac32393bd66ed3d69c23d887d8f086840440caaf15e53cd1 (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:49Z. No independent second source is configured for this entry Last successful check: 2026-11-20T12:40:49Z Last attempt: 2026-11-20T12:40:49Z Notes and limitations: Extracted automatically from a single official source (section "Authentication"). Related: https://latestn.com/tool/cursor/install-and-setup/sdk-installation How do I install the Cursor Python SDK? https://latestn.com/tool/cursor/install-and-setup/self-hosted-machines-requirements What are the requirements to use Self-Hosted Machines with Cursor Cloud Agents? https://latestn.com/tool/cursor/install-and-setup/set-up-rollouts How do I set up Cursor Rollouts for my repositories? https://latestn.com/tool/cursor/install-and-setup/notion-installation How do I install and connect Cursor in Notion? https://latestn.com/tool/cursor/install-and-setup/origin-cli-authentication How do I authenticate the Cursor Origin CLI? https://latestn.com/tool/cursor/install-and-setup/pin-bridge-release How do I pin a Cursor SDK Bridge release? 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/install-and-setup/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/install-and-setup/sdk-authentication POST: https://latestn.com/dispute/tool/cursor/install-and-setup/sdk-authentication with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/cursor/install-and-setup/sdk-authentication?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I authenticate the Cursor Python SDK? Revision 1, last verified 2026-11-20T12:40:49Z. https://latestn.com/tool/cursor/install-and-setup/sdk-authentication (accessed 2026-11-21T09:59:32Z). @misc{LatestN_tool_cursor_install_and_setup_sdk_authentication_r1, title = {How do I authenticate the Cursor Python SDK?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/cursor/install-and-setup/sdk-authentication}}, note = {Revision 1; digest sha256:d1a2e5a785d5ee82; last verified 2026-11-20T12:40:49Z; accessed 2026-11-21T09:59:32Z} } 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/install-and-setup/sdk-authentication