Choose a Photon project, create a server-side API key, and prepare your development environment.
Beta is a preview. The Beta (2.0) platform does not have all the features
of Stable yet. For example, iMessage on Beta
supports only text and images, so tapbacks, polls, message effects, and voice
notes are only on Stable
for now. Use Stable for production agents, and confirm that Beta supports the
features you need before you buy a plan.
Use one project for your first agent. Its channel connections, messages, Voice
profiles, and API key belong together; a key from another project cannot access
them.
1
Choose your project
Open the Photon Beta dashboard. Create an organization
and project if you do not have one, or select your project in the switcher
at the top of the sidebar.Open Settings and copy the Project ID, beginning
with pho_prj_.
Keep this project selected for the rest of the walkthrough. Ask an
organization admin for access if you cannot manage its keys or channels.
2
Create an API key
Open API keys and enter First agent as the key
name. Open the Create key menu and select Custom. On New API
key, choose an expiry and select the permissions it needs:
Permission
When you need it
project:read
Read messages for the iMessage and email tests.
project:write
Send the agent’s replies.
platforms:read
Read channel configuration or a Voice profile with a client.
platforms:write
Run the optional client examples that assign a shared line or connect a domain. Not needed when you configure them in the dashboard.
The messaging program needs project:read and project:write. Add platform permissions only for the setup examples you run. Sample dashboard preview; no key is shown.
Select Create key. Copy and save the key when it appears on the page:
it is shown only once. If you lose it, create a replacement and revoke
the old key rather than trying to retrieve its plaintext.
3
Set your environment variables
In the terminal where you will run the examples, set your project ID and
key. Replace the placeholders locally; do not paste real credentials into
shared code or screenshots. Choose the block for your shell; macOS uses
zsh by default. Both prompts keep the key out of shell history.
export PHOTON_PROJECT_ID="pho_prj_REPLACE_WITH_YOUR_PROJECT_ID"read -rs "PHOTON_API_KEY?Photon API key: "; echoexport PHOTON_API_KEY
export PHOTON_PROJECT_ID="pho_prj_REPLACE_WITH_YOUR_PROJECT_ID"read -rsp "Photon API key: " PHOTON_API_KEY; echoexport PHOTON_API_KEY
Your application’s secret manager is a better place for a deployed key.
Run these examples on your computer or server, never in a browser or mobile
app. Do not commit the key or a local environment file. All HTTP examples
use https://api.photon.codes with Authorization: Bearer <key>.
4
Install the client for your language
Create a working directory for the examples. Choose one language; you do
not need all four. These setup examples use published client 0.5.0.
mkdir photon-first-agent && cd photon-first-agentnpm init -ynpm pkg set type=modulenpm install @photon-ai/[email protected]
cargo new photon-first-agentcd photon-first-agentcargo add photonhq-api@=0.5.0cargo add tokio --features macros,rt-multi-thread
mkdir photon-first-agent && cd photon-first-agentgo mod init example.com/photon-first-agentgo get github.com/photon-hq/api/packages/[email protected]
Use Node.js 24 or later for the TypeScript walkthrough, Python 3.11 or
later, Rust 1.88 or later, or Go 1.25 or later. The messaging programs
explain their additional HTTP dependencies where needed.
Text a shared line from your own phone or iMessage email.
Email
Connect a domain and reply to your first incoming email.
Voice
Route a phone call to your voice agent over SIP.
Was this page helpful?
⌘I
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Photon","colors":{"primary":"#47c6ed","light":"#47c6ed","dark":"#47c6ed"},"logo":{"light":"https://mintcdn.com/photon-6d78d87b/hMh2hcolREhyGomA/logo/light.svg?fit=max\u0026auto=format\u0026n=hMh2hcolREhyGomA\u0026q=85\u0026s=11512a078b26743f3341822f7095a71d","dark":"https://mintcdn.com/photon-6d78d87b/hMh2hcolREhyGomA/logo/dark.svg?fit=max\u0026auto=format\u0026n=hMh2hcolREhyGomA\u0026q=85\u0026s=0922f188bdc8d783c1460a707ca58215"},"favicon":"https://mintcdn.com/photon-6d78d87b/3zs1WCtLT_oibNcX/favicon-128x128.png?fit=max\u0026auto=format\u0026n=3zs1WCtLT_oibNcX\u0026q=85\u0026s=8c914cde9344878faf68ae81d39414e5","api":{"asyncapi":"https://api.photon.codes/asyncapi.yaml"},"navbar":{"links":[{"href":"https://photon.codes/contact","label":"Contact"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.photon.codes"}},"footer":{"socials":{"x":"https://x.com/photon_hq","github":"https://github.com/photon-hq","linkedin":"https://www.linkedin.com/company/photonhq","discord":"https://discord.gg/4c3VJzDfNA"}},"seo":{"metatags":{"canonical":"https://photon.codes/docs","og:image":"https://photon.codes/docs/images/social-cover.png","og:image:alt":"Photon dashboard on a blue background","twitter:card":"summary_large_image","twitter:image":"https://photon.codes/docs/images/social-cover.png","twitter:image:alt":"Photon dashboard on a blue background"}},"fonts":{"heading":{"family":"PolySansArabicVF","weight":600,"source":"https://photon.codes/docs/fonts/PolySansArabicVF.woff2","format":"woff2"},"body":{"family":"Inter"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"markdown":{"instructions":["Use Stable documentation by default. Honor an explicit Beta request or a URL under /docs/beta/. If the requested version conflicts with the installed CLI package or API origin, clarify the target before writing integration code.","Pages under /docs/beta/ document Beta; other product pages document Stable. Keep the CLI package, commands, API origin, and credentials within the selected version. State the documentation version in your answer.","For MCP search, always pass version: Stable or version: Beta. Unfiltered search mixes both versions. For filesystem reads, keep Beta queries under /beta/ and exclude /beta/ from Stable queries; discover paths before reading them.","The public docs base is https://photon.codes/docs. Convert MCP page paths to public URLs under that base, preserving /beta/ when present. Read https://photon.codes/docs/skill.md for version selection and https://photon.codes/docs/llms.txt for the version indexes."]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"photon-6d78d87b","hasAudioNarration":false,"actualSubdomain":"photon-6d78d87b","customDomains":["docs.photon.codes"],"gitSource":{"type":"github","owner":"photon-hq","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":false,"issues":false,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af59fba319ac6c743b5f147","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Low-level SDKs","count":1029},{"language":"default","tag":"Type reference","count":1009},{"language":"default","tag":"index","count":481},{"language":"default","tag":"chat","count":439},{"language":"default","tag":"Interfaces","count":434},{"language":"default","tag":"API Reference","count":269},{"language":"default","tag":"Endpoints","count":256},{"language":"default","tag":"spectrum-ts","count":235},{"language":"default","tag":"Type Aliases","count":225},{"language":"default","tag":"API Client","count":199}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/docs/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n@font-face{font-family:'PolySansArabicVF';src:url('https://photon.codes/docs/fonts/PolySansArabicVF.woff2') format('woff2');font-weight:400;font-display:swap}.mdx-content{font-size:16px;font-weight:400;line-height:28px;letter-spacing:0}#page-title,.mdx-content h1{font-size:36px;font-weight:600;line-height:40px;letter-spacing:-0.2px}.mdx-content h2:not(.not-prose){font-size:24px;font-weight:600;line-height:32px;letter-spacing:0}.mdx-content h3,[data-component-part=\"card-title\"]{font-family:var(--font-family-headings-custom);font-size:20px;font-weight:600;line-height:32px;letter-spacing:0.02em}#header .prose{font-size:18px;font-weight:400;line-height:28px;letter-spacing:-0.02em}.mdx-content strong{font-weight:600}[data-component-part=\"card-content\"],[data-component-part=\"callout-content\"]{font-size:14px;font-weight:400;line-height:24px;letter-spacing:0}.sidebar-group a,.sidebar-group button,.toc a,[data-layout-item=\"search-entry\"]{font-size:14px;font-weight:400;line-height:20px;letter-spacing:0;text-shadow:none}.sidebar-group-header,.nav-tabs-item,.mobile-nav-tabs-item,[data-component-part=\"version-select-trigger\"],#table-of-contents h2,#table-of-contents h2 button{font-family:var(--font-family-body-custom);font-size:14px;font-weight:600;line-height:20px;letter-spacing:0;text-shadow:none}.eyebrow{font-family:'Geist Mono', monospace;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0}.mdx-content figcaption,[data-component-part=\"code-block-header\"],[data-component-part=\"code-group-tab-bar\"] [role=\"tab\"]{font-family:var(--font-family-headings-custom);font-size:12px;font-weight:400;line-height:18px;letter-spacing:0}.mdx-content a.link,[data-component-part=\"card-cta\"]{font-weight:600;letter-spacing:-0.01em}.mdx-content a.link{font-size:inherit;line-height:inherit}[data-component-part=\"card-cta\"]{font-size:14px;line-height:24px}code,pre{font-family:'Geist Mono', monospace!important;font-size:14px!important;line-height:24px!important;letter-spacing:0}code{font-weight:500}pre,pre code{font-weight:400}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border, rgba(128, 128, 128, 0.3));border-radius:9999px;border:2px solid transparent;background-clip:content-box}::-webkit-scrollbar-thumb:hover{background:rgba(128, 128, 128, 0.5);border:2px solid transparent;background-clip:content-box}::-webkit-scrollbar-corner{background:transparent}*{scrollbar-width:thin;scrollbar-color:var(--border, rgba(128, 128, 128, 0.3)) transparent}#navbar div:has(>a>.nav-logo){flex:0 0 auto!important}#navbar div[class*=\"ustify-end\"]{margin-left:0!important;flex:0 0 auto!important}#navbar .nav-tabs{column-gap:24px!important}#navbar #topbar-cta-button{position:fixed!important;right:1.75rem!important;top:0!important;height:3.5rem!important;display:flex!important;align-items:center!important}*/\n\n/*#content-container {\n border: 1px solid rgba(255, 255, 255, 0.07) !important;\n background-color: #101010;\n scroll-behavior: smooth !important;\n}\n\n.sidebar-group {\n font-weight: 400 !important;\n}*/\n\n#table-of-contents{scrollbar-width:none}#table-of-contents::-webkit-scrollbar{display:none}#navbar a:is([href^=\"https://app.photon.codes\"],[href^=\"https://app.beta.photon.codes\"]),#navbar li.navbar-link>a[href=\"https://photon.codes/contact\"]{--corner-shape-fallback: 0.945;position:relative!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;corner-shape:superellipse(1.1);border-radius:calc(40px * var(--one-if-corner-shape-supported, var(--corner-shape-fallback, 1)))!important;box-shadow:rgba(255, 255, 255, 0.5) 0px 0px 5px 2px inset!important;border-style:solid!important;border-width:1.5px!important;padding:8px 14px!important;color:rgb(255, 255, 255)!important;font-family:'Inter', sans-serif!important;font-size:14px!important;font-weight:500!important;text-shadow:rgba(128, 128, 128, 0.25) 0px 0px 4px;transition:box-shadow 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1)!important;transform:scale(1)}#navbar a:is([href^=\"https://app.photon.codes\"],[href^=\"https://app.beta.photon.codes\"]):hover,#navbar li.navbar-link>a[href=\"https://photon.codes/contact\"]:hover{box-shadow:rgba(255, 255, 255, 0.5) 0px -2.77px 7.82px 2px inset!important;transform:scale(1.02)!important}#navbar a:is([href^=\"https://app.photon.codes\"],[href^=\"https://app.beta.photon.codes\"]),#navbar li.navbar-link>a[href=\"https://photon.codes/contact\"]{gap:0!important;transition:box-shadow 0.35s ease,\n transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),\n gap 0.25s ease!important}#navbar a:is([href^=\"https://app.photon.codes\"],[href^=\"https://app.beta.photon.codes\"]):hover,#navbar li.navbar-link>a[href=\"https://photon.codes/contact\"]:hover{gap:4px!important}#navbar a:is([href^=\"https://app.photon.codes\"],[href^=\"https://app.beta.photon.codes\"])::after,#navbar li.navbar-link>a[href=\"https://photon.codes/contact\"]::after{content:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='20' height='20'%3E%3Cpath d='M 0 0 L 5.5 5.25 L 0 10.5' fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' stroke='white' transform='translate(13.75 6.75)'/%3E%3Cpath d='M 14.25 0 L 0 0' fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' stroke='white' transform='translate(4.75 12)'/%3E%3C/svg%3E\");display:inline-block;width:0;height:20px;opacity:0;overflow:hidden;line-height:0;transition:opacity 0.25s ease, width 0.25s ease;vertical-align:middle}#navbar a:is([href^=\"https://app.photon.codes\"],[href^=\"https://app.beta.photon.codes\"]):hover::after,#navbar li.navbar-link>a[href=\"https://photon.codes/contact\"]:hover::after{opacity:1;width:20px}#navbar a:is([href^=\"https://app.photon.codes\"],[href^=\"https://app.beta.photon.codes\"]){background-color:rgb(41, 152, 217)!important;border-color:rgba(41, 152, 217, 0.62)!important;margin-left:8px!important}#navbar li.navbar-link>a[href=\"https://photon.codes/contact\"]{background-color:rgb(0, 0, 0)!important;border-color:rgba(255, 255, 255, 0.62)!important}nav[aria-label=\"Mobile menu\"] a:is([href^=\"https://app.photon.codes\"],[href^=\"https://app.beta.photon.codes\"]){margin-left:0!important}nav[aria-label=\"Mobile menu\"] a:is([href^=\"https://app.photon.codes\"],[href^=\"https://app.beta.photon.codes\"])::before{display:none}#navbar li.navbar-link:has(>a[href=\"https://photon.codes/contact\"]){position:fixed!important;right:calc(28px + 111px + 8px)!important;top:0!important;height:56px!important;display:flex!important;align-items:center!important;border:none!important;background:transparent!important;padding:0!important;margin:0!important;z-index:10;transition:right 0.25s ease!important}#navbar:has(a:is([href^=\"https://app.photon.codes\"],[href^=\"https://app.beta.photon.codes\"]):hover) li.navbar-link:has(>a[href=\"https://photon.codes/contact\"]){right:calc(28px + 111px + 8px + 24px)!important}nav[aria-label=\"Mobile menu\"] li.navbar-link:has(>a[href=\"https://photon.codes/contact\"]){position:static!important;top:auto!important;right:auto!important;transform:none!important}div:has(>#chat-assistant-sheet){margin-top:56px!important;height:calc(100vh - 56px)!important;top:56px!important}.pt-catalogue{--pt-line: rgba(0, 0, 0, 0.12);--pt-line-soft: rgba(0, 0, 0, 0.07);--pt-header-bg: rgba(255, 255, 255, 0.92);--pt-4xx: rgb(146, 93, 10);--pt-5xx: rgb(176, 42, 42);--pt-accent: rgb(23, 122, 176)}html.dark .pt-catalogue{--pt-line: rgba(255, 255, 255, 0.14);--pt-line-soft: rgba(255, 255, 255, 0.08);--pt-header-bg: rgba(20, 20, 20, 0.85);--pt-4xx: rgb(217, 152, 41);--pt-5xx: rgb(217, 84, 84);--pt-accent: rgb(71, 198, 237)}.pt-controls{display:flex;gap:8px;margin:1rem 0 0.75rem;flex-wrap:wrap}.pt-search{flex:1 1 20rem;min-width:0}.pt-search,.pt-group{padding:7px 11px;border-radius:8px;border:1px solid var(--pt-line);background:transparent;color:inherit;font-size:0.875rem}.pt-search:focus,.pt-group:focus{outline:none;border-color:var(--pt-accent)}.pt-group{cursor:pointer}.pt-catalogue{width:100%}.pt-scroll{overflow-x:auto;border:1px solid var(--pt-line);border-radius:8px}.pt-table{width:100%;border-collapse:collapse;font-size:0.875rem;margin:0}.pt-table th,.pt-table td{text-align:left;padding:8px 12px;vertical-align:top;border-bottom:1px solid var(--pt-line-soft)}.pt-table tbody tr:last-child td{border-bottom:none}.pt-table th{position:sticky;top:0;z-index:1;font-weight:500;white-space:nowrap;background:var(--pt-header-bg)}.pt-sortable{cursor:pointer;user-select:none}.pt-arrow{display:inline-block;width:1em;opacity:0.7}.pt-table code{white-space:nowrap;font-size:0.8125rem}.pt-table th:nth-child(1),.pt-table th:nth-child(2),.pt-table th:nth-child(3){width:1%;white-space:nowrap}.pt-4xx{color:var(--pt-4xx)}.pt-5xx{color:var(--pt-5xx)}.pt-meta{opacity:0.7}.pt-target td{background:color-mix(in srgb, var(--pt-accent) 14%, transparent)}.pt-target td:first-child{box-shadow:inset 2px 0 0 var(--pt-accent)}.pt-count,.pt-empty{font-size:0.8125rem;opacity:0.65;margin-top:0.6rem}.pt-row{scroll-margin-top:96px}:root{--docs-stable-icon: url(\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M15%203a6%206%200%200%200-6%208l-6%206a2.8%202.8%200%200%200%204%204l6-6a6%206%200%200%200%208-6l-4%203-5-5%203-4Z%22%2F%3E%3C%2Fsvg%3E\");--docs-beta-icon: url(\"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M9%203h6m-5%200v6l-5.5%209.4A1.7%201.7%200%200%200%206%2021h12a1.7%201.7%200%200%200%201.5-2.6L14%209V3M8%2014h8%22%2F%3E%3C%2Fsvg%3E\")}[data-component-part=\"version-select-trigger\"],[data-component-part=\"version-select-item\"]:nth-child(1){--docs-version-icon: var(--docs-stable-icon)}html:is([data-current-path=\"/beta\"],[data-current-path^=\"/beta/\"]) [data-component-part=\"version-select-trigger\"],[data-component-part=\"version-select-item\"]:nth-child(2){--docs-version-icon: var(--docs-beta-icon)}[data-component-part=\"version-select-trigger\"]::before,[data-component-part=\"version-select-item\"]::before{content:\"\";display:block;flex:0 0 1rem;width:1rem;height:1rem;background-color:currentColor;mask:var(--docs-version-icon) center / contain no-repeat}html[data-current-path=\"/beta/changelog\"] #content-area{--content-width: 44rem}"}],"page":{"pagePath":"beta/get-started/project","slug":"/beta/get-started/project","pageMetadata":{"title":"Set up your project","description":"Choose a Photon project, create a server-side API key, and prepare your development environment.","href":"/beta/get-started/project"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Choose a Photon project, create a server-side API key, and prepare your development environment.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Frame,Heading,OptimizedImage,Step,Steps,Table,Warning}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Beta is a preview.`}),` The Beta (2.0) platform does not have all the features\nof `,_jsx(_components.a,{href:`/spectrum-ts/introduction`,children:`Stable`}),` yet. For example, iMessage on Beta\nsupports only text and images, so tapbacks, polls, message effects, and voice\nnotes are `,_jsx(_components.a,{href:`/spectrum-ts/providers/imessage/messaging-features`,children:`only on Stable`}),`\nfor now. Use Stable for production agents, and confirm that Beta supports the\nfeatures you need before you buy a plan.`]})}),`\n`,_jsx(_components.p,{children:`Use one project for your first agent. Its channel connections, messages, Voice\nprofiles, and API key belong together; a key from another project cannot access\nthem.`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Choose your project`,children:[_jsxs(_components.p,{children:[`Open the `,_jsx(_components.a,{href:`https://app.beta.photon.codes`,children:`Photon Beta dashboard`}),`. Create an organization\nand project if you do not have one, or select your project in the switcher\nat the top of the sidebar.`]}),_jsxs(_components.p,{children:[`Open `,_jsx(_components.a,{href:`https://app.beta.photon.codes/project/settings`,children:`Settings`}),` and copy the `,_jsx(_components.strong,{children:`Project ID`}),`, beginning\nwith `,_jsx(_components.code,{children:`pho_prj_`}),`.\nKeep this project selected for the rest of the walkthrough. Ask an\norganization admin for access if you cannot manage its keys or channels.`]})]}),_jsxs(Step,{title:`Create an API key`,children:[_jsxs(_components.p,{children:[`Open `,_jsx(_components.a,{href:`https://app.beta.photon.codes/project/api-keys`,children:`API keys`}),` and enter `,_jsx(_components.strong,{children:`First agent`}),` as the key\nname. Open the `,_jsx(_components.strong,{children:`Create key`}),` menu and select `,_jsx(_components.strong,{children:`Custom`}),`. On `,_jsx(_components.strong,{children:`New API\nkey`}),`, choose an expiry and select the permissions it needs:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Permission`}),_jsx(_components.th,{children:`When you need it`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`project:read`})}),_jsx(_components.td,{children:`Read messages for the iMessage and email tests.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`project:write`})}),_jsx(_components.td,{children:`Send the agent’s replies.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`platforms:read`})}),_jsx(_components.td,{children:`Read channel configuration or a Voice profile with a client.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`platforms:write`})}),_jsx(_components.td,{children:`Run the optional client examples that assign a shared line or connect a domain. Not needed when you configure them in the dashboard.`})]})]})]}),_jsx(Frame,{caption:`The messaging program needs project:read and project:write. Add platform permissions only for the setup examples you run. Sample dashboard preview; no key is shown.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/photon-6d78d87b/V6Fb3YFhqvBYZr_3/beta/images/get-started/project-api-key.webp?fit=max\u0026auto=format\u0026n=V6Fb3YFhqvBYZr_3\u0026q=85\u0026s=2fbc7954d2edbd2647cdd2b98f344bcd`,alt:`New API key page named First agent, expiring in 90 days, with project:read and project:write selected.`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`1906`,height:`1906`,\"data-path\":`beta/images/get-started/project-api-key.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/photon-6d78d87b/V6Fb3YFhqvBYZr_3/beta/images/get-started/project-api-key.webp?w=280\u0026fit=max\u0026auto=format\u0026n=V6Fb3YFhqvBYZr_3\u0026q=85\u0026s=a1baa0fdeaf8686a698b42b19c1ab17d 280w, https://mintcdn.com/photon-6d78d87b/V6Fb3YFhqvBYZr_3/beta/images/get-started/project-api-key.webp?w=560\u0026fit=max\u0026auto=format\u0026n=V6Fb3YFhqvBYZr_3\u0026q=85\u0026s=2751127339f28e5158f40b5d64aa9b48 560w, https://mintcdn.com/photon-6d78d87b/V6Fb3YFhqvBYZr_3/beta/images/get-started/project-api-key.webp?w=840\u0026fit=max\u0026auto=format\u0026n=V6Fb3YFhqvBYZr_3\u0026q=85\u0026s=5b62dc6564d049e35c50029fd8300ada 840w, https://mintcdn.com/photon-6d78d87b/V6Fb3YFhqvBYZr_3/beta/images/get-started/project-api-key.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=V6Fb3YFhqvBYZr_3\u0026q=85\u0026s=7b804b527cb6d92617293917473cb7f9 1100w, https://mintcdn.com/photon-6d78d87b/V6Fb3YFhqvBYZr_3/beta/images/get-started/project-api-key.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=V6Fb3YFhqvBYZr_3\u0026q=85\u0026s=1827a15205eb50edd653fd4a3e5cbaf5 1650w, https://mintcdn.com/photon-6d78d87b/V6Fb3YFhqvBYZr_3/beta/images/get-started/project-api-key.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=V6Fb3YFhqvBYZr_3\u0026q=85\u0026s=99e609bcdbcde24890f6f86b0983aa26 2500w`})}),_jsxs(_components.p,{children:[`Select `,_jsx(_components.strong,{children:`Create key`}),`. Copy and save the key when it appears on the page:\n`,_jsx(_components.strong,{children:`it is shown only once`}),`. If you lose it, create a replacement and revoke\nthe old key rather than trying to retrieve its plaintext.`]})]}),_jsxs(Step,{title:`Set your environment variables`,children:[_jsx(_components.p,{children:`In the terminal where you will run the examples, set your project ID and\nkey. Replace the placeholders locally; do not paste real credentials into\nshared code or screenshots. Choose the block for your shell; macOS uses\nzsh by default. Both prompts keep the key out of shell history.`}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`macOS (zsh)`,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PHOTON_PROJECT_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pho_prj_REPLACE_WITH_YOUR_PROJECT_ID\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`read`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -rs`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"PHOTON_API_KEY?Photon API key: \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`echo`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PHOTON_API_KEY`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Bash`,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PHOTON_PROJECT_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pho_prj_REPLACE_WITH_YOUR_PROJECT_ID\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`read`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -rsp`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Photon API key: \"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PHOTON_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`echo`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` PHOTON_API_KEY`})]}),`\n`]})})})]}),_jsx(_components.p,{children:`Your application’s secret manager is a better place for a deployed key.`}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`Run these examples on your computer or server, never in a browser or mobile\napp. Do not commit the key or a local environment file. All HTTP examples\nuse `,_jsx(_components.code,{children:`https://api.photon.codes`}),` with `,_jsx(_components.code,{children:`Authorization: Bearer \u003ckey>`}),`.`]})})]}),_jsxs(Step,{title:`Install the client for your language`,children:[_jsxs(_components.p,{children:[`Create a working directory for the examples. Choose one language; you do\nnot need all four. These setup examples use published client `,_jsx(_components.strong,{children:`0.5.0`}),`.`]}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`mkdir`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` photon-first-agent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026 `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`cd`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` photon-first-agent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` init`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -y`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` pkg`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` set`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` type=module`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @photon-ai/[email protected]`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`mkdir`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` photon-first-agent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026 `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`cd`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` photon-first-agent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`python3`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -m`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` venv`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` .venv`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`source`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` .venv/bin/activate`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` photonhq-api==`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.5.0`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Rust`,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`cargo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` new`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` photon-first-agent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`cd`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` photon-first-agent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`cargo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` photonhq-api@=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.5.0`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`cargo`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` tokio`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --features`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` macros,rt-multi-thread`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Go`,numberOfLines:`3`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`mkdir`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` photon-first-agent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026 `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`cd`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` photon-first-agent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`go`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` mod`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` init`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` example.com/photon-first-agent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`go`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` get`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` github.com/photon-hq/api/packages/[email protected]`})]}),`\n`]})})})]}),_jsx(_components.p,{children:`Use Node.js 24 or later for the TypeScript walkthrough, Python 3.11 or\nlater, Rust 1.88 or later, or Go 1.25 or later. The messaging programs\nexplain their additional HTTP dependencies where needed.`})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`choose-your-first-conversation`,children:`Choose your first conversation`}),`\n`,_jsxs(CardGroup,{cols:3,children:[_jsx(Card,{title:`iMessage`,icon:`comment`,href:`/beta/get-started/imessage`,children:_jsx(_components.p,{children:`Text a shared line from your own phone or iMessage email.`})}),_jsx(Card,{title:`Email`,icon:`envelope`,href:`/beta/get-started/email`,children:_jsx(_components.p,{children:`Connect a domain and reply to your first incoming email.`})}),_jsx(Card,{title:`Voice`,icon:`phone`,href:`/beta/get-started/voice`,children:_jsx(_components.p,{children:`Route a phone call to your voice agent over SIP.`})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Set up your project","description":"Choose a Photon project, create a server-side API key, and prepare your development environment.","href":"/beta/get-started/project"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Choose your first conversation","slug":"choose-your-first-conversation","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/photon-6d78d87b/8a01e78c178e74c3/dashboard-links.js"],"subdomain":"photon-6d78d87b","siteName":"Photon","title":"Set up your project - Photon","navMaps":{"firstHrefInVersion":{"Stable":{"href":"/spectrum-ts/introduction","matchLevel":4},"Beta":{"href":"/beta/get-started/project","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T02:44:44.193Z","originalFileLocation":"beta/get-started/project.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Choose a Photon project, create a server-side API key, and prepare your development environment.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Photon\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/photon-6d78d87b/HRqZH79kgfZw4ONr/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/photon-6d78d87b/HRqZH79kgfZw4ONr/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/photon-6d78d87b/HRqZH79kgfZw4ONr/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/photon-6d78d87b/HRqZH79kgfZw4ONr/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/photon-6d78d87b/HRqZH79kgfZw4ONr/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/photon-6d78d87b/HRqZH79kgfZw4ONr/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/photon-6d78d87b/HRqZH79kgfZw4ONr/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/photon-6d78d87b/HRqZH79kgfZw4ONr/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/photon-6d78d87b/HRqZH79kgfZw4ONr/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Set up your project - Photon\">\u003cmeta data-mint-head property=\"og:description\" content=\"Choose a Photon project, create a server-side API key, and prepare your development environment.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Photon\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://photon.codes/docs/beta/get-started/project\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://photon.codes/docs/images/social-cover.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Set up your project - Photon\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Choose a Photon project, create a server-side API key, and prepare your development environment.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://photon.codes/docs/images/social-cover.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/photon-6d78d87b/HRqZH79kgfZw4ONr/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Photon\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#47c6ed\">\u003cmeta data-mint-head name=\"og:image:alt\" content=\"Photon dashboard on a blue background\">\u003cmeta data-mint-head name=\"twitter:image:alt\" content=\"Photon dashboard on a blue background\">\u003clink data-mint-head rel=\"canonical\" href=\"https://photon.codes/docs/beta/get-started/project\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/beta/get-started/project.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://photon.codes/#organization\",\"name\":\"Photon\",\"url\":\"https://photon.codes\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/photon-6d78d87b/hMh2hcolREhyGomA/logo/light.svg?fit=max\u0026auto=format\u0026n=hMh2hcolREhyGomA\u0026q=85\u0026s=11512a078b26743f3341822f7095a71d\"}},{\"@type\":\"WebSite\",\"@id\":\"https://photon.codes/docs#website\",\"name\":\"Photon\",\"url\":\"https://photon.codes/docs\",\"publisher\":{\"@id\":\"https://photon.codes/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://photon.codes/docs/beta/get-started/project#webpage\",\"url\":\"https://photon.codes/docs/beta/get-started/project\",\"name\":\"Set up your project\",\"description\":\"Choose a Photon project, create a server-side API key, and prepare your development environment.\",\"dateModified\":\"2026-11-12T02:44:44.193Z\",\"isPartOf\":{\"@id\":\"https://photon.codes/docs#website\"},\"breadcrumb\":{\"@id\":\"https://photon.codes/docs/beta/get-started/project#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://photon.codes/docs/beta/get-started/project#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://photon.codes/docs/beta\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Set up your project\",\"item\":\"https://photon.codes/docs/beta/get-started/project\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://photon.codes/docs/beta/get-started/project#article\",\"headline\":\"Set up your project\",\"name\":\"Set up your project\",\"description\":\"Choose a Photon project, create a server-side API key, and prepare your development environment.\",\"url\":\"https://photon.codes/docs/beta/get-started/project\",\"mainEntityOfPage\":{\"@id\":\"https://photon.codes/docs/beta/get-started/project#webpage\"},\"image\":\"https://photon.codes/docs/images/social-cover.png\",\"dateModified\":\"2026-11-12T02:44:44.193Z\",\"publisher\":{\"@id\":\"https://photon.codes/#organization\"},\"isPartOf\":{\"@id\":\"https://photon.codes/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Photon\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Photon\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/beta/get-started/project.md","siteName":"Photon","nav":{"global":null,"versions":[{"version":"Stable","default":true,"pages":[{"title":"Stable","href":"/spectrum-ts/introduction"}]},{"version":"Beta","tag":"Preview","tabs":[{"tab":"Overview","pages":[{"title":"Photon","href":"/beta/photon"},{"group":"Get started","pages":[{"title":"Get started","sidebarTitle":"Introduction","description":"Build your first agent on iMessage, email, or voice, from channel setup to a real conversation.","href":"/beta/index"},{"title":"Set up your project","href":"/beta/get-started/project"},{"title":"Build an iMessage agent","sidebarTitle":"iMessage","description":"Assign a shared iMessage line, run a small agent in your language, and receive its first reply.","href":"/beta/get-started/imessage"},{"title":"Build an email agent","sidebarTitle":"Email","href":"/beta/get-started/email"},{"title":"Build a voice agent","sidebarTitle":"Voice","href":"/beta/get-started/voice"}]},{"group":"Message Delivery","pages":[{"title":"Webhook","href":"/beta/message-delivery/webhook"},{"title":"WebSocket","href":"/beta/message-delivery/websocket"}]},{"group":"Integrations","pages":[{"title":"Chat SDK","href":"/beta/integrations/chat-sdk"}]},{"group":"Apps","pages":[{"title":"Build a Photon App","href":"/beta/apps/overview"},{"title":"Register an App","href":"/beta/apps/register"},{"title":"Install an App","href":"/beta/apps/install"},{"title":"Receive events and call APIs","href":"/beta/apps/webhooks"},{"title":"Permissions and lifecycle","href":"/beta/apps/permissions"},{"title":"Run a local App","href":"/beta/apps/quickstart"}]},{"group":"AI tools","pages":[{"title":"Photon MCP server","sidebarTitle":"MCP server","href":"/beta/ai-tools/mcp"}]},{"group":"Plans and billing","pages":[{"title":"Plans","href":"/beta/plans-and-billing"},{"title":"Billing","href":"/beta/billing"},{"title":"Invoices and payments","href":"/beta/invoices-and-payments"}]},{"group":"Security","pages":[{"title":"Harden your organization","href":"/beta/security/hardening"},{"title":"Single sign-on (SSO)","href":"/beta/sso"},{"title":"Photon support access","href":"/beta/security/support-access"}]}]},{"tab":"Messaging","pages":[{"title":"Messaging","href":"/beta/messaging"}]},{"tab":"Cookbooks","pages":[{"title":"Cookbooks","href":"/beta/cookbooks"}]},{"tab":"API Client","pages":[{"title":"API Client","href":"/beta/api-client"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/beta/cli"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/beta/api-reference"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/beta/changelog"}]}],"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://photon.codes/blog"},{"anchor":"Community","icon":{"style":"brands","name":"discord","library":"fontawesome"},"href":"https://discord.gg/4mr54mqQN"},{"anchor":"Status","icon":{"name":"monitor-waveform","library":"lucide"},"href":"https://status.photon.codes"}]}}]},"basePath":"","title":"Set up your project - Photon","buildId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","deploymentId":"dpl_6PxPD4Fj1JDU9BJxEHvfdUmxKThw","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-BI-0LlZX.js","DynamicMarkdown-JYyBNlrJ.js","zoom-image-lightbox-hIK1nklX.js","lightbox-handle-r17bVUz3.js"]}