Docs
Guide
Custom GPT integration
Wire the Token API into an OpenAI Custom GPT as a Bearer-authenticated action so the model can pull balances, prices, swaps, and DEX data on demand.
What this enables
- Conversational portfolio review across EVM, SVM, and TVM chains
- Live token prices, liquidity, and OHLCV via natural language
- Swap, transfer, and DEX activity lookups with citation back to chain data
- Custom GPTs that read on-chain state for accounting, trading research, or wallet ops
Requirements
- An OpenAI account on a plan that allows Custom GPTs (Plus, Team, or Enterprise).
- A Pinax JWT — issue one from /keys after signing in.
- Roughly 5 minutes.
Setting up the Custom GPT
- Go to chat.openai.com/gpts/editor and click Create.
- In Configure, give the GPT a name, description, and avatar — for example “Onchain Analyst”.
- Scroll to Actions and click Create new action.
- Under Schema, choose Import from URL and paste:
https://token-api.thegraph.com/openapi
The editor pulls the live OpenAPI document and lists every available endpoint. - Under Authentication, choose API Key, set Auth Type to Bearer, and paste your Pinax JWT into the API Key field.
- Set Privacy Policy to:
https://pinax.network/en/legal/privacy
- Save the action, then Create the GPT (private or shared as needed).
Recommended system instructions
Paste this into the GPT's Instructions field — it primes the model to use the Token API endpoints correctly and present results in tables.
You are a blockchain data assistant retrieving onchain token data from the Pinax Token API. Use the available endpoints to fetch balances, liquidity, swap activity, and price history across EVM, SVM, and TVM chains. Present results in tables with token symbols, prices, and USD values. When the user gives a wallet, look up balances across every supported chain before answering. Always cite the chain and the block range your data is from. Never invent contract addresses — call the tokens endpoint to resolve names to addresses.
Example prompt patterns
Wallet and portfolio
- “Show me every token
0xabc...holds, grouped by chain, with USD values.” - “What were the largest inflows to this wallet in the last 30 days?”
Trading analysis
- “Plot daily OHLCV for the WETH/USDC pool on Uniswap V3 over the last 14 days.”
- “Which DEXes routed the most volume on Base today?”
Accounting
- “List every outbound transfer from this treasury wallet in Q1, with counterparty and USD value at the time.”
Best practices
- Treat the JWT like a secret — Custom GPTs you share publicly can be reverse-engineered for their key. Use a dedicated low-quota project for public GPTs.
- Set a billing cap on the project in settings so a runaway GPT can't exhaust your account.
- Rotate the JWT regularly. Revoke and re-issue from /keys if you suspect leakage.
- Tool calls cap at 10 seconds — keep prompts focused so the GPT doesn't plan multi-hop queries that time out.
Related
- Token API endpoints — full catalog with request/response samples.
- MCP server FAQ — Claude Desktop, Cursor, Cline integration.
- Issue a JWT from your project key.