GPT Action API Quickstart

Get your custom GPT integration running in minutes with this step-by-step guide.

Prerequisites

1. Clone and Setup Project

git clone https://github.com/kognova/gpt-action.git my-gpt-action
cd my-gpt-action
./scripts/setup-project.sh my-project-name

2. Configure Clerk

  1. Create a new application at clerk.dev
  2. Copy your publishable key and secret key
  3. Create an OAuth application in Clerk:
    • Add scopes: openid email profile
    • Note the Client ID and Client Secret
    • Leave the tab open (you'll add redirect URI later)

3. Create First User

cd setup
cp .env.example .env
# Edit .env with your Clerk publishable key
bun install
bun run dev

Open http://localhost:5173 and create your first user account.

4. Deploy API to Fly.io

fly launch --name my-project-api
./scripts/set-fly-secrets.sh
fly deploy
Note: Your API will be available at https://my-project-api.fly.dev

5. Configure Custom GPT

  1. In GPT Builder, go to Actions → New Action
  2. Import OpenAPI schema from: https://my-project-api.fly.dev/openapi.json
  3. Configure Authentication:
    • Type: OAuth
    • Authorization URL: https://[clerk-domain].clerk.accounts.dev/oauth/authorize
    • Token URL: https://[clerk-domain].clerk.accounts.dev/oauth/token
    • Scopes: openid email profile
    • Client ID: [from Clerk OAuth app]
    • Client Secret: [from Clerk OAuth app]
  4. Copy the callback URL from GPT Builder
  5. Add it to your Clerk OAuth app's redirect URIs

6. Deploy Site (Optional)

cd site
bun install
bun run build
# Deploy dist/ folder to GitHub Pages

Testing Your Integration

In your custom GPT, try these prompts:

Next Steps

← Back to Home