1# Sites1# Sites
2 2
3Sites lets Codex create, save, deploy, and inspect websites, web apps, and3Sites is in public beta. Availability can depend on your plan, region, and
4games hosted by OpenAI. Use the **Sites** plugin when you want to turn a prompt4 workspace settings.
5or a compatible existing project into a hosted site without setting up a5
6separate deployment workflow.6Sites lets ChatGPT create, host, refine, and share websites, web apps, and games.
7Use Sites when you want to turn a prompt or compatible existing project into a
8hosted experience without setting up a separate deployment workflow.
9
10
11
12Open **Sites** in the ChatGPT desktop app. You can start a site from a prompt or
13from a compatible local project, then return to the Sites view to manage it.
14
15
16
17
18
19
20
21
7 22
8Every Sites deployment URL is a production deployment. If you want to review a23Every Sites deployment URL is a production deployment. If you want to review a
9 build before it becomes live, ask Codex to save a version without deploying24 build before it becomes live, ask ChatGPT to save a version without deploying
10 it.25 it.
11 26
12## Get started with Sites27## Get started with Sites
13 28
14Sites is in preview and currently available for ChatGPT Business and Enterprise
15workspaces, with more plans rolling out later. For ChatGPT Enterprise
16workspaces, an admin must turn it on through role-based access control (RBAC)
17before members can use it. Compare support by plan in
18[Feature availability](https://developers.openai.com/codex/pricing#feature-availability).
19
20<WorkflowSteps variant="headings">29<WorkflowSteps variant="headings">
211. Enable Sites for an Enterprise workspace
22
23 If you use ChatGPT Enterprise, ask your workspace admin to open the RBAC
24 controls in [ChatGPT admin settings](https://chatgpt.com/admin/settings) and
25 turn on Sites for the appropriate role. ChatGPT Business workspaces can skip
26 this step because Sites is enabled by default.
27 30
282. Add the Sites plugin311. Describe the Site
29 32
30 If **Sites** isn't already available, open **Plugins** in the Codex app, find33 Describe the audience, purpose, required behavior, and information the Site
31 **Sites**, and add it to Codex. Start a new thread after installing a plugin.34 should use.
32 35
333. Start a Sites task362. Review the Site
34 37
35 In a thread, describe the site you want to create or publish. You can name38 Review the generated content and behavior. Check that the Site uses the
36 the plugin explicitly with `@Sites`, especially when your task should end in39 intended information and handles data as expected.
37 a hosted deployment.
38 40
39 <CodexScreenshot413. Refine the Site
40 alt="Codex app composer with the Sites plugin and connected apps mentioned in a prompt"
41 lightSrc="/images/codex/sites/prompt-input-light.jpg"
42 darkSrc="/images/codex/sites/prompt-input-dark.jpg"
43 variant="no-wallpaper"
44 />
45 42
464. Review whether to save or deploy43 Describe the changes you want. Add relevant files or visual context when
44 they will help ChatGPT make the change.
47 45
48 Ask Codex to validate the site's build. Then tell it either to save a464. Manage and share the Site
49 deployable version for review or to deploy the approved saved version.
50 47
515. Return to deployed sites48 Return to **Sites** to reopen or refine the Site. When it's ready, choose who
49 can visit it and share the resulting link.
52 50
53 Open **Sites** in the app sidebar to return to your Sites projects. You can51</WorkflowSteps>
54 also ask Codex to inspect saved versions, check deployment status, or change
55 who can access a deployed site.
56 52
57 <CodexScreenshot
58 alt="Sites project list in the Codex app"
59 lightSrc="/images/codex/sites/sites-list-light.jpg"
60 darkSrc="/images/codex/sites/sites-list-dark.jpg"
61 variant="no-wallpaper"
62 />
63 53
64</WorkflowSteps>
65 54
66## Prompt Sites for common tasks55## Prompt Sites for common tasks
67 56
68For a new website, dashboard, or internal tool, include the audience, core57For a new website, dashboard, or internal tool, include the audience, core
69experience, and required data:58experience, and required information:
70 59
71```text60```text
72@Sites Build a project request dashboard for my operations team. Let team61Build a project request dashboard for my operations team. Let team members
73members submit requests, see who owns each one, update the status, and filter62submit requests, see who owns each one, update the status, and filter the list.
74the list. Require people to sign in with their workspace account, and keep the63Require people to sign in with their workspace account, and keep the request
75request data saved between visits.64data saved between visits.
76```65```
77 66
67
68
78For an existing project, ask Sites to prepare and publish the current app:69For an existing project, ask Sites to prepare and publish the current app:
79 70
80```text71```text
81@Sites Deploy this project. Check whether it is compatible with Sites, make any72Deploy this project with Sites. Check whether it is compatible, make any
82required changes, and give me the deployment URL.73required changes, and give me the deployment URL.
83```74```
84 75
86request:79request:
87 80
88```text81```text
89@Sites Add persistent player scores and avatar uploads to this game. Use82Add player scores and avatar uploads to this game. Keep the scores and uploaded
90the appropriate Sites storage and deploy the updated game.83avatars between visits.
91```84```
92 85
93Browse the [Sites showcase](https://developers.openai.com/showcase/sites) for deployed internal apps and86Browse the [Sites showcase](https://developers.openai.com/showcase) for deployed internal apps and the full
94 the full prompts used to create them.87 prompts used to create them.
95 88
96## Understand projects, versions, and deployments89## Understand projects, versions, and deployments
97 90
91A Site is a persistent hosted output that you can reopen, refine, configure,
92and share from **Sites** in ChatGPT.
93
94
95
98A Sites project links a local source project to hosting managed through Sites.96A Sites project links a local source project to hosting managed through Sites.
99Codex stores that linkage and optional storage binding names in97Sites stores that linkage and optional storage binding names in
100`.openai/hosting.json`. A newly created local starter can begin without a98`.openai/hosting.json`. A newly created local starter can begin without a
101`project_id`; Sites adds one after it provisions the hosted project.99`project_id`; Sites adds one after it provisions the hosted project.
102 100
111}109}
112```110```
113 111
112
113
114
115
116
117
114Sites publishing has two separate stages:118Sites publishing has two separate stages:
115 119
1161. **Save a version.** Codex builds the deployable site and associates that1201. **Save a version.** ChatGPT builds a deployable version. For a local source
117 version with the source Git commit used for the build. Use this stage when121 project, ChatGPT associates the version with the Git commit used for the
118 you want a reviewable deployment candidate.122 build. Use this stage when you want a reviewable deployment candidate.
1192. **Deploy a version.** Codex publishes a saved version and reports the1232. **Deploy a version.** ChatGPT publishes a saved version and reports the
120 production URL when deployment succeeds. Use this only when you intend for124 production URL when deployment succeeds. Use this only when you intend for
121 the selected audience to access the site.125 the selected audience to access the site.
122 126
123Ask Codex to list or inspect saved versions when you need to identify a127Ask ChatGPT to list or inspect saved versions when you need to identify a
124previous deployment candidate.128previous deployment candidate.
125 129
130
131
126## Choose a supported site shape132## Choose a supported site shape
127 133
128Sites hosts projects that build Cloudflare Worker-compatible output as ES134For new projects, the Sites workflow can start with its recommended Site
129modules. For new projects, the Sites workflow can start with its recommended135starter. For an existing project, ask ChatGPT to confirm that the project can
130site starter. For an existing site, ask Codex to confirm that the project's136produce compatible deployment artifacts before you request a deployment.
131build can produce compatible deployment artifacts before you request a
132deployment.
133 137
134Tell Codex about the product behavior you need so it can select the appropriate138Tell ChatGPT about the product behavior you need so it can select the appropriate
135site shape:139site shape:
136 140
137| Site need | What to ask Sites for |141| Site need | What to ask Sites for |
138| -------------------------------------------------------------- | ----------------------------------------------------------------------------- |142| -------------------------------------------------------------- | ----------------------------------------------------------------------------- |
139| Content-led website or landing page | A site with no persistent application state unless the experience requires it |143| Content-led website or landing page | A Site with no persistent application state unless the experience requires it |
140| Saved records, user progress, or game scores | D1, a relational database for durable structured data |144| Saved records, user progress, or game scores | D1, a relational database for durable structured data |
141| Images, documents, audio, video, or other uploads | R2, object storage for files |145| Images, documents, audio, video, or other uploads | R2, object storage for files |
142| Uploaded files with searchable metadata | D1 for metadata and R2 for file contents |146| Uploaded files with searchable metadata | D1 for metadata and R2 for file contents |
143| Internal site that needs the current workspace user's identity | Workspace-authenticated user identity |147| Internal site that needs the current workspace user's identity | Workspace-authenticated user identity |
144| Public sign-in or an external identity provider | An authentication-enabled Sites project |148| Public sign-in or an external identity provider | An authentication-enabled Site |
145 149
146Don't request durable storage for temporary presentation state, such as a150Don't request durable storage for temporary presentation state, such as a
147theme choice or a dismissed banner. Do request it for product data that people151theme choice or a dismissed banner. Do request it for product data that people
149 153
150## Control access and secrets154## Control access and secrets
151 155
152Set the audience before you share a deployed URL. For a new site, keep access156Hosting a Site doesn't automatically make it public. Keep access limited while
153limited to the owner and workspace admins until you have reviewed the content,157you review the content, data handling, and expected audience.
154data handling, and expected audience.158
159Depending on your account and workspace settings, sharing options can include:
155 160
156You can ask Sites to apply one of these access modes:161- Only you or people you invite.
162- Everyone in your workspace.
163- Anyone with the link.
157 164
158| Access mode | Who can access the site |165Sharing lets people visit the Site; it doesn't let them edit it. Workspace
159| -------------------------------- | --------------------------------------------------------------------------------------------- |166admins can restrict whether members can share Sites publicly.
160| Owner and admins (`admins_only`) | The site owner and workspace admins |
161| Workspace (`workspace_all`) | All active users in the workspace |
162| Custom (`custom`) | Specific active users or workspace groups that you choose; Sites continues to allow the owner |
163 167
164For example:168For example:
165 169
166```text170```text
167@Sites Change this deployed site's access to everyone in my workspace after171Change this Site's access to everyone in my workspace after showing me the
168showing me the current site and confirming the deployment URL.172current Site and confirming its URL.
169```173```
170 174
171### Configure runtime environment values175### Configure runtime environment values
172 176
173Open **Sites** in the app sidebar and select a project to add, update, or remove177Open **Sites**, then open the Site's settings to add, update, or remove hosted
174hosted environment variables and secrets in the Sites panel. Don't store these178environment variables and secrets. Keep secret values out of prompts, attached
175values in `.openai/hosting.json`. Keep local `.env` and `.env.example` files179files, and Site content.
176aligned with the keys needed for local development, and don't commit secret180
177values.181
182
178 183
179When you add, update, or remove hosted environment values, ask Codex to184
185Don't store these values in `.openai/hosting.json`. Keep local `.env` and
186`.env.example` files aligned with the keys needed for local development, and
187don't commit secret values.
188
189When you add, update, or remove hosted environment values, ask ChatGPT to
180redeploy the approved saved version so the next deployment uses the updated190redeploy the approved saved version so the next deployment uses the updated
181configuration.191configuration.
182 192
193
194
183## Review before you share195## Review before you share
184 196
185Before you deploy or widen access:197Before you share a Site:
198
199- Review the Site's content and behavior in the preview.
200- Check that the Site handles information and uploaded files as expected.
201- Confirm that the Site doesn't expose confidential information or secret
202 values.
203- Choose the narrowest sharing option that fits the intended audience.
204- Open the shared Site and confirm that the intended audience can visit it.
205
206
207
208For a Site built from a local project, also review the source changes and any
209database migrations in the Codex [review pane](https://learn.chatgpt.com/docs/code-review?surface=app).
210
186 211
187- Review the source changes and any database migrations in the Codex
188 [review pane](https://developers.openai.com/codex/app/review).
189- Confirm that the build succeeded and that the selected saved version is the
190 version you intend to publish.
191- Check that only the intended audience can access the site.
192- Confirm that you configured runtime secret values through Sites and didn't
193 commit them in source files.
194- After deployment, ask Codex to confirm deployment status and the production
195 URL before you share it.
196 212
197## Related documentation213## Related documentation
198 214
199- [Plugins](https://developers.openai.com/codex/plugins) explains how to install and invoke Codex plugins.215
200- [Codex app](https://developers.openai.com/codex/app) introduces app navigation and project threads.216
201- [Review and ship changes](https://developers.openai.com/codex/app/review) explains how to inspect source217- [ChatGPT desktop app](https://learn.chatgpt.com/docs/app) introduces app navigation, projects, and tasks.
218- [Review and ship changes](https://learn.chatgpt.com/docs/code-review?surface=app) explains how to inspect source
202 changes before publishing them.219 changes before publishing them.