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

# Decisions

> Answer typed questions using current web evidence.



## OpenAPI

````yaml /public-openapi.json post /v1/decisions
openapi: 3.1.0
info:
  title: Parallel API
  description: Parallel API
  contact:
    name: Parallel Support
    url: https://parallel.ai
    email: support@parallel.ai
  version: 0.1.2
servers:
  - url: https://api.parallel.ai
    description: Parallel API
security:
  - ApiKeyAuth: []
tags:
  - name: Search
    description: >-
      Search returns ranked URLs with extended excerpts suitable for LLM
      consumption. Inputs are a natural-language objective and optional keyword
      queries. Source policies allow including or excluding specific domains and
      have configurable output sizes. The returned extended snippets contain
      dense, relevant information from relevant pages.

      - Result: ranked list with URL, title, and long text excerpts


      Images, Places, Shopping, Hotels and Flights return typed results for one
      kind of content.

      - The Images API returns ranked images from the web. Inputs are keyword
      queries and an optional natural-language objective. `fast`: lowest latency
      and cost. `advanced` (default): slower, with higher-quality results.
      Result: title, direct image URL, source page URL, and dimensions.

      - The Places API finds places such as restaurants, shops and attractions
      near a location. Inputs are a query, and a location name or coordinates.
      `fast`: lowest latency, with fewer results. `advanced` (default): slower,
      with more complete results. Result: name, website, address, phone,
      coordinates, rating tier, price level, and opening hours.

      - The Shopping API finds products for sale at online stores. Inputs are
      keyword queries, an optional natural-language objective, and optional
      price and condition filters. Result: title, store page URL, merchant,
      price, rating, availability, and other stores' offers.

      - The Hotels API finds hotels and vacation rentals with live prices.
      Inputs are a location, check-in and check-out dates, and guests, with
      optional price, rating and star class filters. Result: name, website or
      booking page, address, coordinates, star class, rating tier, nightly and
      total price, and each seller's offer.

      - The Flights API finds itineraries with live fares. Inputs are origin and
      destination airports, travel dates, and passengers, with optional cabin,
      stop, price, airline and time filters. Result: total price, a booking
      link, and each leg's flights, times, stops and layovers.
  - name: Extract
    description: >-
      Extract returns excerpts or full content from one or more URLs. Inputs are
      a list of URLs and an optional search objective and keyword queries. The
      returned excerpts or full content is formatted as markdown and suitable
      for LLM consumption.

      - Result: excerpts or full content from the URL formatted as markdown
  - name: Decisions
    description: >-
      Answer typed choice, score, and probability questions using current web
      evidence, with shared citations for the request.
  - name: Tasks
    description: >-
      The Task API executes web research and extraction tasks. Clients submit a
      natural-language objective with an optional input schema; the service
      plans retrieval, fetches relevant URLs, and returns outputs that conform
      to a provided or inferred JSON schema. Supports deep research style
      queries and can return rich structured JSON outputs. Processors trade-off
      between cost, latency, and quality. Each processor supports calibrated
      confidences.

      - Output metadata: citations, excerpts, reasoning, and confidence per
      field


      Task Groups enable batch execution of many independent Task runs with
      group-level monitoring and failure handling.

      - Submit hundreds or thousands of Tasks as a single group

      - Observe group progress and receive results as they complete

      - Real-time updates via Server-Sent Events (SSE)

      - Add tasks to an existing group while it is running

      - Group-level retry and error aggregation
  - name: FindAll
    description: >-
      The FindAll API discovers and evaluates entities that match complex
      criteria from natural language objectives. Submit a high-level goal and
      the service automatically generates structured match conditions, discovers
      relevant candidates, and evaluates each against the criteria. Returns
      comprehensive results with detailed reasoning, citations, and confidence
      scores for each match decision. Streaming events and webhooks are
      supported.
  - name: Monitor
    description: >-
      The Monitor API watches the web for material changes on a fixed frequency.
      Each monitor runs once on creation and then on its configured schedule,
      emitting events when meaningful changes are detected.

      - `event_stream` monitors track a search query and emit an event for each
      new material change.

      - `snapshot` monitors track a specific task run's output and emit an event
      when the output changes.


      Results can be polled via the events endpoint or delivered via webhooks.
  - name: Memory
    description: >-
      The Memory API retrieves and manages memories created by Tasks, Monitors,
      and FindAll runs. Memories can be personal or isolated with a
      `memory_scope_key`.
  - name: Responses API
    description: >-
      An OpenAI-Responses-compatible interface for answers grounded in live web
      research, with URL citations. Point any Responses-API client — the OpenAI
      Python SDK, OpenAI TypeScript SDK, the Agents SDK, or raw HTTP — at
      `https://api.parallel.ai` with your Parallel API key, set `model` to
      `parallel`, and call `/v1/responses`.

      - `input` accepts a plain string or an array of role/content messages
      (canonical OpenAI shape; text content only).

      - `reasoning.effort` (`low`/`medium`/`high`/`auto`) controls how much
      research is performed, trading response time for answer quality.

      - Multi-turn via `previous_response_id`.

      - Structured outputs via `text.format = {"type": "json_schema", "name":
      ..., "schema": {...}}`.

      - Streaming (`stream=true`) emits the standard OpenAI Responses SSE
      lifecycle: `response.created` and `response.in_progress`, then output item
      / content part / text delta events with URL-citation annotations, the
      matching `*.done` events, and a terminal `response.completed` — or
      `response.failed` if the request fails mid-stream.
paths:
  /v1/decisions:
    post:
      tags:
        - Decisions
      summary: Decisions
      description: Answer typed questions using current web evidence.
      operationId: grounded_decisions_v1_decisions_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroundedDecisionRequest'
            example:
              state:
                company: Clay
                website: https://www.clay.com
              questions:
                has_cli:
                  type: noul
                  instructions: Does Clay offer an official command-line interface (CLI)?
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroundedDecisionResponse'
              examples:
                live:
                  summary: Response from a live request, with citations shortened.
                  value:
                    mode: fast
                    answers:
                      has_cli:
                        type: noul
                        noul: 0.9992643798509062
                    usage:
                      input_tokens: 4212
                      output_tokens: 0
                    citations:
                      - url: https://developers.clay.com/concepts/cli-basics
                        title: CLI basics
                        excerpts:
                          - >-
                            The Clay CLI (clay) is JSON-first: every command
                            writes machine-readable JSON to stdout on success
                            and a structured error envelope to stderr on
                            failure.
                      - url: https://university.clay.com/docs/cli-security-privacy
                        title: CLI security & privacy - Clay Docs
                        excerpts:
                          - >-
                            Clay's CLI lets your team drive a Clay workspace
                            from a terminal or coding agent instead of the UI.
                    decision_id: decisions_34b4be1b1405e19ba5516d9bb76c56ad
        '422':
          description: Request validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                type: error
                error:
                  ref_id: <reference-id>
                  message: Request validation error
      x-code-samples:
        - lang: Python
          source: |-
            import os

            import requests

            response = requests.post(
                "https://api.parallel.ai/v1/decisions",
                headers={"x-api-key": os.environ["PARALLEL_API_KEY"]},
                json={
                    "state": {
                        "company": "Clay",
                        "website": "https://www.clay.com",
                    },
                    "questions": {
                        "has_cli": {
                            "type": "noul",
                            "instructions": "Does Clay offer an official command-line interface (CLI)?",
                        }
                    },
                },
                timeout=30,
            )
            response.raise_for_status()
            decision = response.json()

            answer = decision["answers"]["has_cli"]
            if answer["type"] == "refusal":
                print("No decision returned; review this question.")
            else:
                print("Estimated probability:", answer["noul"])

            for citation in decision["citations"]:
                print(citation["url"])
        - lang: TypeScript
          source: |-
            async function main() {
                const response = await fetch("https://api.parallel.ai/v1/decisions", {
                    method: "POST",
                    headers: {
                        "Content-Type": "application/json",
                        "x-api-key": process.env.PARALLEL_API_KEY!,
                    },
                    body: JSON.stringify({
                        state: {
                            company: "Clay",
                            website: "https://www.clay.com",
                        },
                        questions: {
                            has_cli: {
                                type: "noul",
                                instructions: "Does Clay offer an official command-line interface (CLI)?",
                            },
                        },
                    }),
                });
                if (!response.ok) {
                    throw new Error(`Decision failed: ${response.status} ${await response.text()}`);
                }

                const decision = await response.json();
                const answer = decision.answers.has_cli;
                if (answer.type === "refusal") {
                    console.log("No decision returned; review this question.");
                } else {
                    console.log("Estimated probability:", answer.noul);
                }
                for (const citation of decision.citations) {
                    console.log(citation.url);
                }
            }

            main().catch(console.error);
        - lang: cURL
          source: |-
            curl https://api.parallel.ai/v1/decisions \
              -H "Content-Type: application/json" \
              -H "x-api-key: $PARALLEL_API_KEY" \
              -d '{
                "state": {
                  "company": "Clay",
                  "website": "https://www.clay.com"
                },
                "questions": {
                  "has_cli": {
                    "type": "noul",
                    "instructions": "Does Clay offer an official command-line interface (CLI)?"
                  }
                }
              }'
components:
  schemas:
    GroundedDecisionRequest:
      properties:
        advanced_settings:
          anyOf:
            - $ref: '#/components/schemas/AdvancedDecisionSettings'
            - type: 'null'
          description: >-
            Optional advanced configuration for decision grounding. When
            provided, the object must include after_date, location, or
            include_excerpts.
        mode:
          type: string
          const: fast
          title: Mode
          description: Decision execution mode.
          default: fast
        state:
          $ref: '#/components/schemas/JsonValue'
          description: >-
            Context shared by all questions. Accepts any JSON value. Together
            with the largest question, this may use at most 32,000 estimated
            input tokens.
        questions:
          patternProperties:
            ^[A-Za-z0-9_-]+$:
              oneOf:
                - $ref: '#/components/schemas/GroundedChoiceQuestion'
                - $ref: '#/components/schemas/GroundedScoreQuestion'
                - $ref: '#/components/schemas/GroundedNoulQuestion'
              discriminator:
                propertyName: type
                mapping:
                  choice: '#/components/schemas/GroundedChoiceQuestion'
                  noul: '#/components/schemas/GroundedNoulQuestion'
                  score: '#/components/schemas/GroundedScoreQuestion'
          type: object
          maxProperties: 100
          minProperties: 1
          title: Questions
          description: >-
            1 to 100 questions keyed by names containing only ASCII letters,
            numbers, underscores, and hyphens. State plus the largest question
            may use at most 32,000 estimated input tokens. Each value is a
            predicate (`noul`), choice, or score question.
      additionalProperties: false
      type: object
      required:
        - state
        - questions
      title: Decision request
    GroundedDecisionResponse:
      properties:
        mode:
          type: string
          const: fast
          title: Mode
        answers:
          additionalProperties:
            oneOf:
              - $ref: '#/components/schemas/GroundedChoiceAnswer'
              - $ref: '#/components/schemas/GroundedScoreAnswer'
              - $ref: '#/components/schemas/GroundedNoulAnswer'
              - $ref: '#/components/schemas/GroundedRefusalAnswer'
            discriminator:
              propertyName: type
              mapping:
                choice: '#/components/schemas/GroundedChoiceAnswer'
                noul: '#/components/schemas/GroundedNoulAnswer'
                refusal: '#/components/schemas/GroundedRefusalAnswer'
                score: '#/components/schemas/GroundedScoreAnswer'
          type: object
          title: Answers
          description: >-
            Answers keyed by the question names from the request. Any question
            can return a refusal.
        usage:
          $ref: '#/components/schemas/GroundedDecisionUsage'
        citations:
          items:
            $ref: '#/components/schemas/GroundedDecisionCitation'
          type: array
          title: Citations
          description: >-
            Web sources included in the shared decision context. Applies to the
            whole request, without a per-answer source mapping. Can be empty.
        decision_id:
          type: string
          title: Decision Id
          description: >-
            Decision ID: `decisions_` followed by a UUID without hyphens.
            Include this ID when reporting an issue or giving feedback so we can
            find the request's logs and trace.
          examples:
            - decisions_cad0a6d2dec046bd95ae900527d880e7
      type: object
      required:
        - mode
        - answers
        - usage
        - citations
        - decision_id
      title: Decision response
    ErrorResponse:
      properties:
        type:
          type: string
          const: error
          title: Type
          description: Always 'error'.
        error:
          $ref: '#/components/schemas/Error'
          description: Error.
      type: object
      required:
        - type
        - error
      title: ErrorResponse
      description: Response object used for non-200 status codes.
    AdvancedDecisionSettings:
      properties:
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
          description: >-
            Supported ISO 3166-1 alpha-2 country code for geo-targeted search
            results. Case-insensitive; normalized to lowercase. Invalid or
            unsupported codes return a validation error.
          examples:
            - us
            - gb
            - de
            - jp
        after_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: After Date
          description: Prefer sources published on or after this date (YYYY-MM-DD).
          examples:
            - '2026-11-03'
        include_excerpts:
          type: boolean
          title: Include Excerpts
          description: >-
            Whether citations include the excerpts used to ground the decision.
            When false, every citation has an empty excerpts array.
          default: true
      additionalProperties: false
      type: object
      title: AdvancedDecisionSettings
      description: Advanced configuration for decision grounding.
    JsonValue: {}
    GroundedChoiceAnswer:
      properties:
        type:
          type: string
          const: choice
          title: Type
          default: choice
        choice:
          type: string
          title: Choice
          description: Selected option name from the question criteria.
        probabilities:
          additionalProperties:
            type: number
          type: object
          title: Probabilities
          description: Estimated probability for each option, keyed by option name.
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
          description: >-
            Model-reported confidence, when available. This is distinct from the
            probability assigned to the selected option.
      type: object
      required:
        - choice
        - probabilities
      title: Choice
    GroundedScoreAnswer:
      properties:
        type:
          type: string
          const: score
          title: Type
          default: score
        score:
          type: number
          title: Score
          description: >-
            Probability-weighted mean of the zero-based level indices. Can be
            fractional.
        legend:
          additionalProperties:
            type: string
          type: object
          title: Legend
          description: >-
            Maps string indices to the level descriptions from the question
            criteria.
        probabilities:
          additionalProperties:
            type: number
          type: object
          title: Probabilities
          description: Estimated probability for each level, keyed by its string index.
        confidence:
          anyOf:
            - type: number
            - type: 'null'
          title: Confidence
          description: >-
            Model-reported confidence, when available. This is distinct from any
            one level's probability.
      type: object
      required:
        - score
        - legend
        - probabilities
      title: Score
    GroundedNoulAnswer:
      properties:
        type:
          type: string
          const: noul
          title: Type
          default: noul
        noul:
          type: number
          title: Noul
          description: Estimated probability that the condition is true, from 0 to 1.
      type: object
      required:
        - noul
      title: Predicate
    GroundedRefusalAnswer:
      properties:
        type:
          type: string
          const: refusal
          title: Type
          description: >-
            The downstream decision provider refused this question; no value or
            probabilities are returned.
          default: refusal
      type: object
      title: Refusal
    GroundedDecisionUsage:
      properties:
        input_tokens:
          type: integer
          title: Input Tokens
        output_tokens:
          type: integer
          const: 0
          title: Output Tokens
          description: Always 0 for compatibility with the upstream contract.
      type: object
      required:
        - input_tokens
        - output_tokens
      title: Usage
    GroundedDecisionCitation:
      properties:
        url:
          type: string
          title: Url
          description: Source page URL.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Page title. Omitted when unavailable.
        excerpts:
          items:
            type: string
          type: array
          title: Excerpts
          description: >-
            Passages used to ground the decision. Empty when
            advanced_settings.include_excerpts is false.
      type: object
      required:
        - url
        - excerpts
      title: Citation
    Error:
      properties:
        ref_id:
          type: string
          title: Reference ID
          description: Reference ID for the error.
        message:
          type: string
          title: Message
          description: Human-readable message.
        detail:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Detail
          description: Optional detail supporting the error.
      type: object
      required:
        - ref_id
        - message
      title: Error
      description: An error message.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````