FetchFox uses a cost plus model, which means that we charge a fee on top of our AI and proxy costs. If you prefer, you can provide your own API keys for either or both of those. If you provide an API key for those services, billing for that service will be handled through your service provider.

AI API keys

To use your own API key for AI, use the ai option in any request. You will need to specify two fields: model and apiKey. Below is an example that uses your API key for OpenAI.
curl -X POST "https://api.fetchfox.ai/api/extract" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $FETCHFOX_API_KEY" \
-d '{
   "urls": ["https://pokemondb.net/pokedex/bulbasaur"],
   "template": "get basic pokemon data",
   "ai": {
     "model": "openai:gpt-4o",
     "apiKey": "sk-proj-..."
   }
}'
This request will use the provided API key throughout the entire extraction process, and your AI usage billing will be handled by OpenAI. Currently, we support three AI providers:
  • OpenAI with model IDs prefixed with openai:
  • Google’s Gemini with model IDs prefixed with gemini:
  • OpenRouter with model IDs prefixed with openrouter:

Proxy API keys

To use your own API key for AI, use the proxy option in any request. We support HTTP proxies and CDP proxies. To use your own API key for proxies, set the tier field to byok, and pass in either HTTP or CDP proxy credentials. To pass in HTTP proxy credentials, use the server, username, and password fields, like the example below.
curl -X POST "https://api.fetchfox.ai/api/extract" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $FETCHFOX_API_KEY" \
-d '{
   "urls": ["https://pokemondb.net/pokedex/bulbasaur"],
   "template": "get basic pokemon data",
   "proxy": {
     "tier": "byok",
     "server": "server.example.com:54321",
     "username": "your-proxy-username",
     "password": "secret-password"
   }
}'
To pass in CDP proxy credentials, use the cdp field and set it to the connection endpoint, like the example below.
curl -X POST "https://api.fetchfox.ai/api/extract" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $FETCHFOX_API_KEY" \
-d '{
   "urls": ["https://pokemondb.net/pokedex/bulbasaur"],
   "template": "get basic pokemon data",
   "proxy": {
     "tier": "byok",
     "cdp": "wss://username:passsword@server.example.com:54321"
   }
}'
In either of these cases, your network billing will be handled by your proxy provider.