Parallel
Parallel ↗ is a web API purpose-built for AIs, providing production-ready outputs with minimal hallucination and evidence-based results.
https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/parallel
When making requests to Parallel, you can route to any Parallel endpoint through AI Gateway by appending the path after parallel
. For example, to access the Tasks API at /v1/tasks/runs
, use:
https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/parallel/v1/tasks/runs
When making requests to Parallel, ensure you have the following:
- Your AI Gateway Account ID.
- Your AI Gateway gateway name.
- An active Parallel API key.
The Tasks API ↗ allows you to create comprehensive research and analysis tasks.
curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/parallel/v1/tasks/runs \ --header 'x-api-key: {parallel_api_key}' \ --header 'Content-Type: application/json' \ --data '{ "input": "Create a comprehensive market research report on the HVAC industry in the USA including an analysis of recent M&A activity and other relevant details.", "processor": "ultra" }'
The Search API ↗ enables advanced search with configurable parameters.
curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/parallel/v1beta/search \ --header 'x-api-key: {parallel_api_key}' \ --header 'Content-Type: application/json' \ --data '{ "objective": "When was the United Nations established? Prefer UN'\''s websites.", "search_queries": [ "Founding year UN", "Year of founding United Nations" ], "processor": "base", "max_results": 10, "max_chars_per_result": 6000 }'
The Chat API ↗ is supported through AI Gateway's Unified Chat Completions API. See below for more details:
You can also use the OpenAI-compatible endpoint (/ai-gateway/usage/chat-completion/
) to access Parallel models using the OpenAI API schema. To do so, send your requests to:
https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/compat/chat/completions
Specify:
{"model": "parallel/{model}"}
import OpenAI from "openai";
const apiKey = "{parallel_api_key}";const accountId = "{account_id}";const gatewayId = "{gateway_id}";const baseURL = `https://gateway.ai.cloudflare.com/v1/${accountId}/${gatewayId}/compat`;
const client = new OpenAI({ apiKey, baseURL,});
try { const model = "parallel/speed"; const messages = [{ role: "user", content: "Hello!" }]; const chatCompletion = await client.chat.completions.create({ model, messages, }); const response = chatCompletion.choices[0].message; console.log(response);} catch (e) { console.error(e);}
The FindAll API ↗ enables structured data extraction from complex queries.
curl https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/parallel/v1beta/findall/ingest \ --header 'x-api-key: {parallel_api_key}' \ --header 'Content-Type: application/json' \ --data '{ "query": "Find all AI companies that recently raised money and get their website, CEO name, and CTO name." }'
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark
-