P
Pythia HFM Help

Self-Serve Setup and Troubleshooting

Everything a customer needs to go from signup to paid subscription, invite teammates, generate rules, and connect ChatGPT Actions. This page is public; it does not include secrets.

Quick Start (API Key -> ChatGPT)

Goal: create an API key in the Admin console and connect it to ChatGPT Actions.

1. Sign in and open Admin

Open /admin and sign in. If Google Sign-In is enabled for your deployment, use the Sign in with Google button.

2. Create an API key (Platform Admin only)

In /admin open API Keys and click Create. Copy the key once (treat it like a password).

If you do not see the API Keys section, your account is not a Platform Admin (Superuser). Ask the platform operator to create a key for your integration.

3. Import the Actions spec in ChatGPT

In ChatGPT, create or edit a GPT and open Actions. Choose Import from URL and paste the OpenAPI URL:

https://YOUR-CLOUD-RUN-URL/api/openapi.chatgpt.json

4. Set Actions authentication

Configure an API key header named X-API-Key and paste your key value (for example phfm_...).

5. Test

Ask the GPT to run a simple call first (for example a health check) and then try a rules operation.

Customer Workflow

Goal: customer signs up, enters card, gets a 14-day free trial, then is automatically charged unless they cancel.

Step-by-step

1. Create account on the landing page (/).

2. After signup, the app redirects to Stripe Checkout to add a card and start the trial.

3. After Checkout success, the user lands in the Admin console (/admin).

4. Invite teammates (Admin console -> Team Users).

5. Generate, validate, analyze, or refactor rules (Admin console -> Rules).

6. Optionally connect ChatGPT Actions using an API key (see below).

Trial and Billing

Trial length
14 days (two weeks)
Charge timing
Auto-charged when the trial ends (week 3)
Cancel anytime
Use Stripe Customer Portal from the Admin console
Cancel anytime: in /admin open Billing and click Open Portal.

Roles and Access

The app is multi-tenant. Each company is a tenant. Users belong to a tenant and have a role.

Owner vs Admin vs Member

Owner: controls billing for their tenant.

Admin: manages day-to-day operations (users, rule files, generation) but should not manage billing or API keys.

Member/Viewer: restricted access (read-only or limited operations).

System Admin (Platform Operator)

Platform Admin (Superuser) can see platform-wide data (all tenants, global metrics, contact messages) and manage platform-only features.

Only Platform Admins can create/list/revoke API keys for integrations (including ChatGPT Actions).

Normal tenant owners/admins can only see their own tenant data.

ChatGPT Actions

ChatGPT Actions calls your API. It must authenticate on each request.

OpenAPI import URL

In ChatGPT Actions, use "Import from URL" with:

https://YOUR-CLOUD-RUN-URL/api/openapi.chatgpt.json

Example format:

https://pythia-hfm-249623070180.us-central1.run.app/api/openapi.chatgpt.json

Authentication (required)

Actions uses an API key header:

X-API-Key: phfm_...

If you paste the API key into the wrong place and get "Invalid token", verify ChatGPT is sending X-API-Key (not a Bearer JWT).

API Keys

API keys are tenant-scoped. They are intended for integrations (Actions, MCP clients, scripts).

Security: treat API keys like passwords. Do not paste live secret keys into chat. If a key is exposed, revoke it and create a new one.

Who can create API keys?

Only Platform Admins (Superusers) can create/list/revoke API keys in the Admin console.

If you are a normal tenant user, ask the platform operator for an API key (or for them to connect Actions for you).

How many people can use the same API key?

Technically multiple people/tools can share one key, but the recommended pattern is one key per integration so you can revoke without breaking everything.

Core Endpoints

Landing: GET /

Help: GET /help

Admin UI: GET /admin

API docs (Swagger): GET /api/docs

ChatGPT Actions spec: GET /api/openapi.chatgpt.json

Health: GET /api/health

FAQ

After entering card details, it does not return to the app

Check Stripe Checkout success/cancel URLs and verify the browser is not blocking redirects/popups. If needed, open /admin directly after checkout.

ChatGPT Actions says "Could not find a valid URL in servers" or "root origin" mismatch

Make sure the imported spec uses https and the same Cloud Run host as the Actions root origin.