> ## Documentation Index
> Fetch the complete documentation index at: https://docs.octen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate from Parallel

> Map Parallel requests and responses to Octen.

For AI agents: [docs.octen.ai/resources/migrate-from-parallel.md](https://docs.octen.ai/resources/migrate-from-parallel.md)

## Endpoint Map

| Parallel | Octen |
| :- | :- |
| Search (`POST /v1/search`) with an `objective` | [Broad Search](https://docs.octen.ai/api-reference/broad-search.md) (generates its own sub-queries and groups results by sub-query) |
| Search with `search_queries` you want run as written | [Web Search](https://docs.octen.ai/api-reference/search.md) (one request per query) |
| Extract (`POST /v1/extract`) | [Extract](https://docs.octen.ai/api-reference/extract.md) |
| Task (`POST /v1/tasks/runs`) | [Search Agent](https://docs.octen.ai/api-reference/post-search-agent.md) (an async task with optional JSON output) |
| Task with a `pro` or `ultra` processor and a text report | [Deep Research](https://docs.octen.ai/api-reference/deep-research.md) (a streamed report instead of an async run) |
| Responses (`POST /v1/responses`) | [Answer](https://docs.octen.ai/api-reference/answer.md) |
| Chat Completions (`POST /v1beta/chat/completions`) | [Answer](https://docs.octen.ai/api-reference/answer.md), or [Auto Search](https://docs.octen.ai/api-reference/chat-completions.md) to keep the OpenAI Chat Completions format |
| Monitor with `type: "event_stream"` (`POST /v1/monitors`) | [Monitor](https://docs.octen.ai/api-reference/post-monitor.md) with `type: "topic"` |
| Images (`POST /v1/images/search`) | [Image Search](https://docs.octen.ai/api-reference/image-search.md) |
| Places (`POST /v1/places/search`) | [Place Search](https://docs.octen.ai/api-reference/place-search.md) |

## Authentication

| | Parallel | Octen |
| :- | :- | :- |
| Base URL | `https://api.parallel.ai` | `https://api.octen.ai` (OpenAI SDK with Auto Search: `https://api.octen.ai/v1`) |
| Auth header | `x-api-key: <key>` (Responses: `Authorization: Bearer <key>`) | `x-api-key: <key>` or `Authorization: Bearer <key>` |
| Python SDK | `parallel-web` (`Parallel`) | `octen` (`Octen`) |

## Broad Search

### Request Parameters

| Parallel | Octen |
| :- | :- |
| `objective` | `query` (up to 500 characters) |
| `max_chars_total` | `search_options.highlight.max_tokens` (per result, 100-20,000 tokens, default 512) |
| `advanced_settings.max_results` | `search_options.count` (results per sub-query, 1-100, default 5) |
| `advanced_settings.source_policy.include_domains`, `exclude_domains` | `search_options.include_domains`, `search_options.exclude_domains` (a list of domains, up to 1,200 each) |
| `advanced_settings.source_policy.after_date` | `search_options.start_time` (ISO 8601) with `search_options.time_basis: "published"` |

### Response Fields

| Parallel | Octen |
| :- | :- |
| `results[]` (one merged list) | `data.search_results[].results[]` (grouped by sub-query and not deduplicated across groups) |
| `results[].url` | `data.search_results[].results[].url` |
| `results[].title` | `data.search_results[].results[].title` |
| `results[].publish_date` | `data.search_results[].results[].time_published` |
| `results[].excerpts` (a list) | `data.search_results[].results[].highlight` (a string) |
| `search_id` | `request_id` |
| `warnings` | `meta.warning` |
| `usage` | `meta.usage` (`num_search_queries`, `full_content_extra_count`) |

### Code

```python Before (Parallel) theme={null}
import os

from parallel import Parallel

client = Parallel(api_key=os.environ["PARALLEL_API_KEY"])

search = client.search(
    objective="Find the latest information about solid-state battery commercialization. Focus on product launches and production timelines.",
    search_queries=["solid-state battery commercialization", "solid-state battery production timeline"],
)

for result in search.results:
    print(f"{result.title}: {result.url}")
    for excerpt in result.excerpts:
        print(excerpt[:200])
```

```python After (Octen) theme={null}
import os

from octen import Octen

client = Octen(api_key=os.environ["OCTEN_API_KEY"])

response = client.search.broad_search(
    query="Find the latest information about solid-state battery commercialization. Focus on product launches and production timelines.",
    max_queries=3,
)

for group in response.search_results:
    print(f"Query: {group['query']}")
    for result in group["results"]:
        print(f"{result['title']}: {result['url']}")
        print((result.get("highlight") or "")[:200])
```

## Extract

### Request Parameters

| Parallel | Octen |
| :- | :- |
| `urls` (up to 20) | `urls` (up to 20 URLs, each up to 2,048 characters) |
| `objective`, `search_queries` | `query` (up to 500 characters; returns `highlights` instead of `full_content`) |
| `advanced_settings.full_content` | No parameter; `full_content` is returned when `query` is not set |
| `advanced_settings.fetch_policy.max_age_seconds` | `max_age_seconds` (300-31,536,000, default 86,400) |
| `advanced_settings.fetch_policy.timeout_seconds` | `timeout` (seconds per URL, 1-60, default 30) |
| `advanced_settings.links` | `include_links` (an object with `scope` and `max_links` up to 1,000) |

### Response Fields

| Parallel | Octen |
| :- | :- |
| `results[].url` | `data.results[].url` (`data.results` is `response.items` in the Python SDK) |
| `results[].title` | `data.results[].title` |
| `results[].publish_date` | `data.results[].time_published` |
| `results[].excerpts` | `data.results[].highlights` (with `query`) |
| `results[].full_content` | `data.results[].full_content` (without `query`) |
| `results[].links` | `data.results[].links[]` (`url`, `anchor_text`, `is_external`) |
| `results[].acquired_at` | `data.results[].time_last_crawled` |
| `errors[]` (URLs missing from `results`) | `data.results[]` with `status: "failed"` and `error_message` |
| `extract_id` | `request_id` |
| `warnings` | `meta.warning` |
| `usage` | `meta.usage` (`total_urls`, `successful_urls`) |

### Code

```python Before (Parallel) theme={null}
import os

from parallel import Parallel

client = Parallel(api_key=os.environ["PARALLEL_API_KEY"])

extract = client.extract(
    urls=["https://www.un.org/en/about-us/history-of-the-un"],
    objective="When was the United Nations established?",
)

for result in extract.results:
    print(f"{result.title}: {result.url}")
    for excerpt in result.excerpts:
        print(excerpt[:200])
```

```python After (Octen) theme={null}
import os

from octen import Octen

client = Octen(api_key=os.environ["OCTEN_API_KEY"])

response = client.extract.extract(
    urls=["https://www.un.org/en/about-us/history-of-the-un"],
    query="When was the United Nations established?",
)

for item in response.items:
    if item.status == "success":
        print(f"{item.title}: {item.url}")
        for highlight in item.highlights or []:
            print(highlight[:200])
    else:
        print(f"{item.url}: {item.error_message}")
```

## Search Agent

### Request Parameters

| Parallel | Octen |
| :- | :- |
| `input` (text or a JSON object) | `messages` (a `user` message that states the full task in text, not only the `input` value) |
| `processor` (`lite` to `ultra8x`) | `tier` (`auto`, `low`, `medium`, or `high`; default `auto`). `low` to `high` increase search depth, cost, and time. |
| `task_spec.output_schema` with `type: "json"` | `response_format` with `type: "json_schema"` and `schema` (the top-level `type` must be `object`) |
| `task_spec.output_schema` with `type: "text"` | `response_format.type: "text"` (default) |
| `previous_interaction_id` | `previous_task_id` |
| `enable_events` | `stream` (streams `status`, `step`, `content`, `finish`, and `usage` chunks) |

### Response Fields

| Parallel | Octen |
| :- | :- |
| `run_id` | `task_id` |
| `interaction_id` | `task_id` (pass it as `previous_task_id`) |
| `status` (`queued`, `running`, `completed`, `failed`, and others) | `status` (`queued`, `running`, `succeeded`, `failed`, or `cancelled`) |
| `output.content` (a JSON object or text) | `choices[0].message.content` (a JSON string when `response_format.type` is `json_schema`) |
| `output.basis[].citations[]` | `choices[0].message.annotations[]` (`url_citation`) |
| `error.message` | `error.message` (`error.code` is `AGENT_TIMEOUT` or `AGENT_FAILED`) |
| `processor` | `tier`, and `meta.billed_tier` for the tier billed |
| `created_at`, `modified_at` (RFC 3339) | `created_at`, `completed_at` (Unix seconds) |

### Code

```python Before (Parallel) theme={null}
import os

from parallel import Parallel

client = Parallel(api_key=os.environ["PARALLEL_API_KEY"])

task_run = client.task_run.create(
    input="Stripe",
    task_spec={
        "output_schema": {
            "type": "json",
            "json_schema": {
                "type": "object",
                "properties": {
                    "founding_year": {"type": "string"},
                    "total_funding": {"type": "string"},
                },
                "required": ["founding_year", "total_funding"],
                "additionalProperties": False,
            },
        },
    },
    processor="base",
)

run_result = client.task_run.result(task_run.run_id, api_timeout=3600)
print(run_result.output.content)
```

```python After (Octen) theme={null}
import json
import os
import time

import requests

BASE_URL = "https://api.octen.ai/v1/agent"
HEADERS = {"x-api-key": os.environ["OCTEN_API_KEY"]}

task = requests.post(
    BASE_URL,
    headers=HEADERS,
    json={
        "messages": [{"role": "user", "content": "The founding year and total funding raised by Stripe"}],
        "tier": "low",
        "response_format": {
            "type": "json_schema",
            "schema": {
                "type": "object",
                "properties": {
                    "founding_year": {"type": "string"},
                    "total_funding": {"type": "string"},
                },
                "required": ["founding_year", "total_funding"],
                "additionalProperties": False,
            },
        },
    },
    timeout=30,
)
task.raise_for_status()
task_id = task.json()["task_id"]

while True:
    result = requests.get(f"{BASE_URL}/{task_id}", headers=HEADERS, timeout=30).json()
    if result["status"] in ("succeeded", "failed", "cancelled"):
        break
    time.sleep(5)

if result["status"] == "succeeded":
    print(json.loads(result["choices"][0]["message"]["content"]))
else:
    print(result["status"], result.get("error"))
```

## Answer

### Request Parameters

| Parallel | Octen |
| :- | :- |
| `model: "parallel"` | `model` (an LLM ID, default `openai/gpt-6.1-terra`) |
| `input` | `messages` (the question as a `user` message) |
| `instructions` | A `system` message in `messages` |
| `tools` with a `web_search` tool and `filters.allowed_domains`, `filters.blocked_domains` | `web_search_options.include_domains`, `web_search_options.exclude_domains` |
| `stream` | `stream` (default `false`) |

### Response Fields

| Parallel | Octen |
| :- | :- |
| `output[].content[].text` (`output_text` in the OpenAI SDK) | `choices[0].message.content` (cites sources as `[^N]`) |
| `output[].content[].annotations[]` (`url_citation`) | `references[]` (`num`, `title`, `url`, `highlight`). All search results are numbered, and the answer cites them as `[^N]`. |
| `id` | `request_id` |
| `usage` | `meta.usage` (`num_search_queries`, `prompt_tokens`, `completion_tokens`, `total_tokens`) |

### Code

```python Before (Parallel) theme={null}
import os

from openai import OpenAI

client = OpenAI(api_key=os.environ["PARALLEL_API_KEY"], base_url="https://api.parallel.ai/v1")

response = client.responses.create(
    model="parallel",
    input="Who is the current CEO of the largest cloud provider by revenue?",
    reasoning={"effort": "low"},
)

print(response.output_text)
```

```python After (Octen) theme={null}
import os

import requests

response = requests.post(
    "https://api.octen.ai/answer",
    headers={"x-api-key": os.environ["OCTEN_API_KEY"]},
    json={
        "messages": [{"role": "user", "content": "Who is the current CEO of the largest cloud provider by revenue?"}],
    },
    timeout=120,
)
response.raise_for_status()
answer = response.json()

print(answer["choices"][0]["message"]["content"])
for ref in answer["references"]:
    print(f"[^{ref['num']}] {ref['url']}")
```

## Monitor

### Request Parameters

| Parallel | Octen |
| :- | :- |
| `type: "event_stream"` | `type: "topic"` |
| `settings.query` | `topic.query` (up to 500 characters) |
| `frequency` (`1h` to `30d`, in hours, days, or weeks) | `schedule.interval` (`5m` to `59m`, `1h` to `100h`, or `1d` to `30d`; write weeks as days, such as `7d`) |
| `settings.output_schema` (a JSON schema) | `topic.output_schema` (up to 20 fields of type `string`, `number`, or `boolean`) |
| `settings.include_backfill` | No parameter; without `condition` (when to notify, in natural language), the first run sends up to 10 current results marked `change_status: "baseline"` |
| `settings.advanced_settings.source_policy` | `topic.include_domains`, `topic.exclude_domains` (up to 1,200 each) |
| `webhook.url` | `webhook.url` (a public HTTPS URL) |
| `metadata` | `metadata` (up to 8 pairs; keys up to 16 characters, values up to 512 characters) |

### Response Fields

| Parallel | Octen |
| :- | :- |
| `monitor_id` | `data.monitor_id` |
| `status` | `data.status` (`active` on creation) |
| `frequency` | `data.schedule.interval` |
| `metadata` | `data.metadata` |
| `created_at` | `data.created_at` |
| `events[]` from List Monitor Events (`GET /v1/monitors/{monitor_id}/events`) | `data.events[]` from [List monitor events](https://docs.octen.ai/api-reference/get-monitor-events.md) |
| `events[].event_id` | `data.events[].event_id` |
| `events[].event_group_id` | `data.events[].run_id` |
| `events[].event_date` | `data.events[].time_published` |
| `events[].output.content` | `data.events[].highlight`, or `data.events[].fields` with `topic.output_schema` |
| `events[].output.basis[].citations[]` | `data.events[].url`, `data.events[].title` |

### Code

```python Before (Parallel) theme={null}
import os

from parallel import Parallel

client = Parallel(api_key=os.environ["PARALLEL_API_KEY"])

monitor = client.monitor.create(
    type="event_stream",
    frequency="1d",
    processor="lite",
    settings={"query": "AI startup funding announcements"},
    webhook={"url": "https://example.com/webhook", "event_types": ["monitor.event.detected"]},
    metadata={"external_id": "acme-monitor-001"},
)

print(f"Monitor ID: {monitor.monitor_id}")
```

```python After (Octen) theme={null}
import os

import requests

response = requests.post(
    "https://api.octen.ai/monitors",
    headers={"x-api-key": os.environ["OCTEN_API_KEY"]},
    json={
        "type": "topic",
        "topic": {"query": "AI startup funding announcements"},
        "schedule": {"interval": "1d"},
        "webhook": {"url": "https://example.com/webhook"},
        "metadata": {"external_id": "acme-monitor-001"},
    },
    timeout=30,
)
response.raise_for_status()
monitor = response.json()["data"]

print(f"Monitor ID: {monitor['monitor_id']}")
```

***

Last modified on November 24, 2026


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.