GPT Action API Quickstart
Get your custom GPT integration running in minutes with this step-by-step guide.
Prerequisites
- GitHub account for repository and GitHub Pages
- Clerk account (free tier works)
- Fly.io account for API hosting
- OpenAI Plus/Team subscription for custom GPTs
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
- Create a new application at clerk.dev
- Copy your publishable key and secret key
- 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)
- Add scopes:
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
- In GPT Builder, go to Actions → New Action
- Import OpenAPI schema from:
https://my-project-api.fly.dev/openapi.json - 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]
- Copy the callback URL from GPT Builder
- 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:
- "Test the public echo endpoint with 'Hello World'"
- "Get my user information" (triggers OAuth flow)
- "Test the private echo endpoint" (requires auth)
Next Steps
- Customize the API endpoints in
api/server.ts - Add your business logic and integrate with databases
- Configure custom domains for professional deployment
- Review security settings and add rate limiting