# Parallel

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Web search, page extraction, and grounded answers purpose-built for AI agents — token-dense excerpts, sub-second search modes.

**Category:** Search | **Website:** [parallel.ai](https://parallel.ai) | **Docs:** [docs.parallel.ai](https://docs.parallel.ai)

## Access Methods

| Method | Base URL | Auth |
|--------|----------|------|
| **x402 (Base)** | `https://parallel.x402.beta.paywithlocus.com/parallel/` | HTTP 402 auto-payment |
| **MPP (Tempo)** | `https://parallel.mpp.paywithlocus.com/parallel/` | HTTP 402 auto-payment |
| **Wrapped API** | `https://api.beta.paywithlocus.com/api/wrapped/parallel/` | `Authorization: Bearer <LOCUS_API_KEY>` |

**OpenAPI discovery:** `GET https://parallel.x402.beta.paywithlocus.com/openapi.json`

## Endpoints

### Search

Search the web and get back ranked URLs with compressed, LLM-ready excerpts. Modes trade latency for depth: turbo (~200ms), fast (~1s), basic (~1s), advanced (default, ~3s, highest quality).

**Estimated cost:** $0.004 (turbo) / $0.008 (default) + $0.001 per result beyond 10

**Payment:** x402 `exact`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `search_queries` | string[] | Yes | Concise keyword queries, 3-6 words each. Provide 2-3 for best results. |
| `objective` | string | No | Natural-language description of the underlying question or goal. Strongly recommended — focuses results on the most relevant content. |
| `mode` | string | No | Search mode: 'turbo', 'fast', 'basic', or 'advanced' (default). Turbo is cheapest and fastest; advanced gives the highest-quality multi-hop results. |
| `max_chars_total` | number | No | Upper bound on total characters across all result excerpts. |
| `advanced_settings` | object | No | Optional: { max_results (1-20, default 10, extra results billed $0.001 each), source_policy { include_domains, exclude_domains, start_date }, excerpt_settings { max_chars_per_result }, fetch_policy, country }. |
| `client_model` | string | No | The model consuming the results (e.g. 'claude-sonnet-5') — tailors excerpt defaults. |

```bash
curl -X POST https://parallel.x402.beta.paywithlocus.com/parallel/search \
  -H "Content-Type: application/json" \
  -H "x-locus-request-id: <UUID from the 402 response>" \
  -d '{"objective":"Find the official documentation for the HTTP 402 status code","search_queries":["HTTP 402 Payment Required"],"advanced_settings":{"max_results":1}}'
```

### Extract

Extract clean markdown content from up to 20 URLs in one call — objective-focused excerpts by default, optional full page content.

**Estimated cost:** $0.004 (1 URL) + $0.001 per additional URL

**Payment:** x402 `exact`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `urls` | string[] | Yes | URLs to extract content from (1-20). |
| `objective` | string | No | What you are looking for — focuses excerpts on relevant content. |
| `search_queries` | string[] | No | Keyword queries used with objective to focus excerpts. |
| `max_chars_total` | number | No | Upper bound on total characters across all extracted excerpts. |
| `advanced_settings` | object | No | Optional: { excerpt_settings { max_chars_per_result }, full_content (boolean or { max_chars_per_result }), fetch_policy }. Full content is disabled by default. |
| `client_model` | string | No | The model consuming the results (e.g. 'claude-sonnet-5') — tailors excerpt defaults. |

```bash
curl -X POST https://parallel.x402.beta.paywithlocus.com/parallel/extract \
  -H "Content-Type: application/json" \
  -H "x-locus-request-id: <UUID from the 402 response>" \
  -d '{"urls":["https://example.com"]}'
```

### Responses

OpenAI Responses-compatible grounded answers: one question in, one live-web-researched, citation-annotated answer out (~5-60s by effort). Single-shot only.

**Estimated cost:** $0.013 (low) / $0.053 (medium, default) / $0.253 (high)

**Payment:** x402 `exact`

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `input` | string | Yes | The research question as a plain string. Single-shot — include any prior context in the string itself. |
| `model` | string | Yes | Must be 'parallel' (the only model id). |
| `reasoning` | object | No | { effort: 'low' \| 'medium' (default) \| 'high' } — how much web research to perform. Higher effort = better answers, more latency, higher cost. |
| `text` | object | No | Structured outputs: { format: { type: 'json_schema', name, schema } } for JSON answers conforming to your schema. |

```bash
curl -X POST https://parallel.x402.beta.paywithlocus.com/parallel/responses \
  -H "Content-Type: application/json" \
  -H "x-locus-request-id: <UUID from the 402 response>" \
  -d '{"input":"Hello from x402","model":"parallel"}'
```
