API Reference
API: Models
Supported LLM models in Flapjack with pricing. GPT-5.4, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 4.6, and more.
Flapjack agents can use models from OpenAI and Anthropic. The model is set per-agent via the dashboard or API (defaultModel field).
Model Catalog
| Model ID | Vendor | Context Window | Best For |
|---|---|---|---|
gpt-5.4 | OpenAI | 1.05M ctx / 128K out | General purpose (default) |
gpt-5.4-mini | OpenAI | 400K ctx / 128K out | Faster, cheaper |
gpt-5.4-nano | OpenAI | 400K ctx / 128K out | High-volume, lowest cost |
claude-opus-4-7 | Anthropic | 1M ctx (beta) | Deep reasoning, complex tasks |
claude-opus-4-6 | Anthropic | 1M ctx (beta) | Previous-gen Opus — available for agents that haven't migrated to 4.7 |
claude-sonnet-4-6 | Anthropic | 1M ctx (beta) | Near-Opus quality, balanced |
claude-haiku-4-5 | Anthropic | Fast tier / low-latency | Fastest, lowest cost |
Pricing
| Model | Input (per 1M tokens) | Output (per 1M tokens) |
|---|---|---|
gpt-5.4 | $2.50 | $15.00 |
gpt-5.4-mini | $0.75 | $4.50 |
gpt-5.4-nano | $0.20 | $1.25 |
claude-opus-4-7 | $5.00 | $25.00 |
claude-opus-4-6 | $5.00 | $25.00 |
claude-sonnet-4-6 | $3.00 | $15.00 |
claude-haiku-4-5 | $1.00 | $5.00 |
Pricing is subject to change. Usage is tracked per-organization in the dashboard.
Setting a Model
Via Dashboard
Agent → Settings → Model → Select from dropdown
Via API
curl -X PATCH https://api.flapjack.dev/api/agents/abc-123 \
-H "Authorization: Bearer fj_live_..." \
-H "Content-Type: application/json" \
-d '{"defaultModel": "claude-sonnet-4-6"}'
📋 Copy as prompt
Change my Flapjack agent's model to
claude-sonnet-4-6using the PATCH endpoint on/api/agents/{agentId}.
Choosing a Model
| Priority | Recommended Model |
|---|---|
| Best quality | claude-opus-4-7 |
| Balanced (default) | gpt-5.4 |
| Speed | gpt-5.4-mini or claude-haiku-4-5 |
| Cost | gpt-5.4-nano |
Usage Tracking
Flapjack tracks token usage per-request:
- Input tokens (including conversation history)
- Output tokens (agent response)
- Cache read/write tokens (when applicable)
- Compaction input/output tokens (when compaction fires)
- Estimated cost in USD (includes both main and compaction costs)
Usage data is available in the dashboard under analytics.
Next Steps
- API: Agents — set model via agent configuration
- Concepts: Agents — how agents work