Practical AI advice for teams and leaders

Beginner Steps. Advanced AI.

Published guideUpdated

Chapter 4 of 20Set up

Chapter menu20 chapters

Choose your OpenAI access

Keep using ChatGPT sign-in, or explore the optional API route and its separate costs.

Kooka, a friendly kookaburra teacher wearing glasses and holding a blue notebook.

You can keep using ChatGPT sign-in. The API steps are optional.

Follow the pictures

Illustrated examples. Your app may look different. Tap an image to enlarge it.

  1. Check your account

    Open Codex’s profile menu. Check your account and sign-in method; keep ChatGPT sign-in if it already works.

    Illustration: confirm your Codex account and ChatGPT sign-in method.
    Illustrated example
    Click path
    Codex → Profile menu → Account / sign-in status

    Look for: You know which account and sign-in route Codex is using.

    More help with this action

    ChatGPT subscription access and OpenAI API billing are separate. A ChatGPT subscription does not include API-key credit. Local Codex supports either route; API usage charges your Platform account. Codex cloud requires ChatGPT sign-in, and some features differ. The finished static website needs no OpenAI key. AI helps build it; visitors receive ordinary pages. A future chatbot would need its own protected backend and operating budget.

    Show the steps
    1. Check Codex's profile menu for the intended account and authentication route. Continue with ChatGPT sign-in if tasks already work.
    2. Confirm the intended personal or work account is active.
    3. If ChatGPT tasks already work, keep that route. Skip optional actions 3–5 and continue to action 6.
    4. Local Codex supports both methods; cloud requires ChatGPT sign-in, and available features can differ.

    You should now see: You know which account and sign-in route Codex is using.

  2. Understand the two bills

    Read how billing works. ChatGPT sign-in and API-key usage have separate bills; choose which route you want.

    Illustration: ChatGPT plan access and optional API usage have separate billing.
    Illustrated example
    Choose
    ChatGPT sign-in: plan access / API key: separate usage bill

    Look for: You know which account pays for your chosen route.

    More help with this action

    Follow these steps if you want more help.

    Show the steps
    1. Read how authentication affects billing, then inspect your account's current usage controls. Set your own spending preference before longer tasks and check current plan details in your account.
    2. Do not buy API credits simply because you are building a static website.
    3. API authentication uses standard Platform API rates rather than included ChatGPT plan credits.
    4. A future visitor-facing chatbot would need a protected backend and its own running budget.

    You should now see: You know which account pays for your chosen route.

  3. Optional: set up API billing

    Optional API route: open OpenAI Platform Billing. Review its terms before adding payment or credits.

    Illustration: review the optional Platform API billing route before accepting charges.
    Illustrated example
    Optional click path
    OpenAI Platform → Billing → Review account costs

    Look for: If you choose API sign-in, Platform billing is ready and you understand its costs.

    More help with this action

    Follow these steps if you want more help.

    Show the steps
    1. Optional API route: sign in to OpenAI Platform Billing and add payment or credits as required by your account.
    2. Skip this action if staying with ChatGPT sign-in.
    3. Review the requirements displayed for the Platform account you intend to bill.
    4. Only add payment or credits if you accept those charges. Keep payment details out of chat and project files.

    You should now see: If you choose API sign-in, Platform billing is ready and you understand its costs.

  4. Optional: create a private key

    Optional API route: create a practice-project key in API keys. Add an expiry date and save it privately.

    Illustration: create an expiring optional API key and save it privately.
    Illustrated example
    Optional click path
    Practice project → API keys → Create key → Password manager

    Look for: Any API key is stored privately and belongs to your intended Platform project.

    More help with this action

    Follow these steps if you want more help.

    Show the steps
    1. Create or select a practice project in the Platform dashboard. In its API keys area, create a named secret key with an expiry date and save it to a password manager.
    2. Create or select a practice project in the Platform account you intend to bill.
    3. Save the secret directly in your password manager while the dashboard makes it available.
    4. Never put it in fieldnotes-studio, screenshots or Codex chat. It authenticates Codex; the static pages do not need it.

    You should now see: Any API key is stored privately and belongs to your intended Platform project.

  5. Optional: cap spending and sign in

    Optional API route: set a hard spend limit, then sign in using the key. Add an alert for earlier warnings.

    Illustration: set an optional API hard limit before using the private key in the app's sign-in field.
    Illustrated example
    Set first
    Project settings → Limits → Spend → Edit spend limit → Enforce a hard limit → Save
    Then
    Signed-out app → Sign in another way → Key field → Continue

    Look for: API sign-in works with a saved project hard limit and early-warning alerts.

    More help with this action

    Follow these steps if you want more help.

    Show the steps
    1. Follow the project hard-spend-limit instructions: Project settings > Limits > Spend > Edit spend limit. Set your monthly amount, enable Enforce a hard limit, and save.
    2. For API authentication, use the official desktop API-key sign-in instructions. Sign out if needed, choose Sign in another way, enter the key in that authentication field, and continue.
    3. Skip this action for ChatGPT sign-in. Set cost controls before running API tasks.
    4. Alerts warn but do not stop requests. A hard cap stops affected traffic once tracked spend reaches it; enforcement can lag slightly.
    5. On the app's signed-out screen, paste the key only into the authentication field, never into the chat message box.
    6. Add spend alerts below your accepted limit for earlier warnings.

    You should now see: API sign-in works with a saved project hard limit and early-warning alerts.

  6. Check access and usage

    In Codex, send the billing-check prompt. Try a small task, then inspect usage for your chosen account.

    Illustration: try a small Codex task and find usage for the chosen account.
    Illustrated example
    In Codex
    Copy billing prompt → Send → Small task
    Then
    Your chosen account → Usage information

    Look for: A small task works and you can find the usage information for the account paying for it.

    More help with this action

    Follow these steps if you want more help.

    Show the steps
    1. Add spend alerts for earlier warnings, then run a small task and inspect usage. Alerts do not stop requests; hard limits do, but enforcement can lag slightly.
    2. Send Check the billing boundary in your project chat. It explains both routes without requesting your key.
    3. Try a tiny read-only task, such as asking Codex to identify README.md.
    4. Inspect your plan's relevant usage information for ChatGPT sign-in, or Platform usage for API sign-in. Check the actual account dashboard yourself.

    You should now see: A small task works and you can find the usage information for the account paying for it.

Why this step matters

ChatGPT sign-in uses your plan’s access. API keys use separately billed OpenAI Platform usage; a paid ChatGPT plan does not pay your API bill.

This static website needs no OpenAI key. Steps 3–5 are optional; skip them if you keep ChatGPT sign-in.

Basics, explained

API

An interface that lets one program request services from another, such as asking an OpenAI model for a response.

API key

A secret credential that authorises software requests and may allow charges to your account.

Usage-based billing

Charges based on the resources a service consumes, rather than one fixed subscription fee.

Authentication

The process of proving which account or credential is requesting access.

Ask your agent

PromptCheck the billing boundary

Copy into Codex, then adapt it to your project.

Explain ChatGPT sign-in versus API-key billing for Codex. I am building a static website with no visitor AI feature. Explain the required access, where to inspect usage, and what cost controls to verify. Never request my key.
Check your work

Tick each item after you confirm it yourself. You can untick it at any time.

If something goes wrong
API requests fail despite a paid ChatGPT plan.
Inspect Platform billing and project access separately. ChatGPT subscription access does not fund API requests.
API authentication lacks a feature.
Check the official authentication guide. Use ChatGPT sign-in if the feature requires that account or workspace.
Personal notes

Add questions, decisions or ideas for your website. Saved in this browser when available; export your notes to keep a copy. Never enter secrets.

Downloads & saved progressGuide, notes and personal checks

Download the complete guide or export your notes from every chapter. Instructions last reviewed: .

Download guide .md Go to starter files

Checks and notes stay in this browser, separately for each language. Export your notes to preserve them. Never enter API keys or other secrets here.

Starter filesWorking instructions and four skills

These templates give your agent a starting set of working instructions. Review them, adapt them to your website, and save each file at the exact path shown, relative to your project folder.

A downloaded skill is an instruction file. It does not install a test runner, run a security scan, or prove your site is safe. The guide shows how to set up and check that work.

Download the instruction files in the language of this guide. Keep the technical filenames and paths as shown.

Download all starter files .md bundle
FileAGENTS.md

Save at the path above.

Download file
# Website working agreements

This project follows the website brief and acceptance criteria we have agreed with its owner. Use the existing technology choices unless a concrete requirement calls for a change.

## How to work

- For a substantial feature, explain the proposed changes and verification plan before implementing it. Complete authorized local work in small, reviewable stages.
- Read the files relevant to the task. Keep unrelated pages and configuration intact.
- Explain new technical terms in plain language when reporting to the owner.
- Use the repository's website-design, clean-code, website-testing and website-security skills when their workflows apply.
- Record important decisions and unresolved content in the project's notes. Do not invent business facts, endorsements or publishing rights.

## Verification

- Inspect package.json to find the actual build, type-check and test commands. Do not invent a successful check or create a meaningless test just to make a command pass.
- Run checks appropriate to the change. Local tests use disposable fixtures and have no production access; run them and repair failures caused by the requested change without asking at every step.
- Verify visitor interactions in a browser when browser tools are available. Report checks that remain unavailable or incomplete.
- Show the owner a working local preview and summarise changed behaviour, evidence and remaining limitations.

## Credentials and publication

- Keep API keys and other secrets out of browser code, prompts, logs and Git. Store local secrets in ignored files or the chosen secret store.
- Local build and test work is authorized. Publishing the site, sending a real message, processing a payment or changing production data requires the owner's authorization for that action.
- Preserve a recoverable working version before release. Describe how to restore it.

These are starter agreements for a new tutorial project. Adapt them to the owner's actual requirements and existing authorization.
File.agents/skills/website-design/SKILL.md

Save at the path above.

Download file
---
name: website-design
description: Develop or refine a website's visual direction and responsive interface from its brief, content and existing design. Use for page design or visual implementation.
---

Read the website brief and any existing design notes relevant to the requested page. Work within the user's brand, content and technology choices.

When establishing a new direction, propose typography, a small colour palette, a spacing rhythm and a sample page. Explain how these choices support the audience and main visitor action. Use real content to judge hierarchy and line lengths.

Implement reusable elements for navigation, headings, buttons and repeated content. Give primary actions a clear visual hierarchy. Preserve visible keyboard focus, readable contrast and usable labels. Design narrow screens alongside desktop screens; check long headings, navigation and tap targets in a browser.

Use semantic HTML before adding custom interaction. Keep motion optional and respect reduced-motion preferences. Use assets with known permission to publish; record their sources. Do not invent client testimonials, achievements or business facts.

Before expanding a design across all pages, show the first complete page at desktop and mobile widths. Describe the main design decisions and any unresolved content. When a browser tool is unavailable, report that visual verification is still pending.
File.agents/skills/clean-code/SKILL.md

Save at the path above.

Download file
---
name: clean-code
description: Implement or refactor website code into understandable components using the project's existing stack and conventions. Use for website implementation or maintainability work.
---

Read the relevant files and package scripts before choosing an implementation. Preserve working behaviour outside the requested change. Prefer the existing stack and dependencies when they meet the need.

Keep page content separate from repeated layout where that makes editing easier. Name components, variables and functions for their purpose. Use shared components for repeated navigation and page elements; avoid abstraction for a single trivial use.

Handle empty, invalid, loading and error states for interactions that need them. Use native browser controls and semantic HTML when they serve the interaction. Avoid fake form submission, simulated success messages and dead links.

Use type checking and the project's formatting or lint rules where configured. When adding a package, explain its purpose and any new maintenance or runtime requirements. Keep generated build output, dependencies and local environment files out of version control.

Run the existing checks relevant to the change, including a production build when output can change. Summarise changed behaviour, verification results and remaining limits. Explain the main files in plain language so a beginner can find and edit their content.
File.agents/skills/website-testing/SKILL.md

Save at the path above.

Download file
---
name: website-testing
description: Verify website changes through visitor journeys, appropriate automated tests and browser checks. Use when testing a website, investigating a failure or preparing a release.
---

Start from the brief and observable acceptance criteria. Inspect existing test and build commands; do not assume that a script exists. Choose checks based on the changed behaviour and the cost of failure.

Exercise the main visitor journey and affected links, navigation and forms. Include invalid input and relevant error states. For a contact form, verify actual delivery in the agreed test destination before reporting that it works. For an email link, explain that it opens the visitor's configured email app and does not send a message automatically.

Check narrow and wide screens in a browser. Include keyboard navigation, visible focus, accessible names, zoom and horizontal overflow. Automated accessibility results complement these manual checks and do not establish complete accessibility conformance.

Add automated tests for important behaviour or demonstrated regressions. Test observable outcomes and meaningful failure cases; avoid tests that merely repeat the implementation or match incidental wording. Use disposable test data and local fixtures. Never send real messages, charge payments or alter production data without the user's authorization.

Reproduce a failure, fix its cause and rerun affected checks. Report commands run, results, browser checks performed and anything not checked. A successful build shows that the site can be generated; verify visitor behaviour separately. Never report a check as passed when it was skipped or unavailable.
File.agents/skills/website-security/SKILL.md

Save at the path above.

Download file
---
name: website-security
description: Review a website's secrets, dependencies, inputs, permissions and deployment configuration, and repair scoped security findings. Use for requested security review or release preparation.
---

Identify the site's relevant surfaces: static pages, forms, backend routes, authentication, third-party scripts and stored data. Scope review to the actual architecture and authorized environment.

Keep credentials out of browser code, logs, prompts and Git. Distinguish build-time public configuration from server secrets. If a key was committed or exposed, stop using it, explain that deleting the file does not revoke the key, and have the owner revoke or rotate it before further use. Do not print the credential in your report.

Inspect applicable dependency advisories and assess whether the affected package and vulnerable behaviour are used. Repair within the project's compatible versions and rerun affected checks. Avoid automatic forced upgrades that may break the website.

For backend interactions, validate inputs on the server, encode output appropriately, and check authentication and authorization separately. Consider abuse controls for public forms or AI endpoints. An OpenAI API key belongs on the server; publishing a static site does not provide a secret server environment.

Check HTTPS and applicable security headers at the actual hosting layer. Collect only the data the feature needs, and explain its destination and retention. Do not claim legal compliance from a code scan.

Report each finding with its location, plausible impact, fix and verification. State review scope, tools used, unresolved findings and inaccessible surfaces. A clean scan is evidence about that scan's scope, not a guarantee that the website has no vulnerabilities. Do not scan third-party systems or deploy changes outside the authorized task.
Back to the chapter start