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

# Run deep search

> Answer a natural-language research question synchronously.

Submits a Deep Search query and returns the generated answer in the same request.

## Example

```bash theme={null}
curl "https://app.lev8.com/v1/deep-search" \
  --request POST \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer $LEV8_API_KEY" \
  --data '{
    "query": "What does OpenAI do and who is its CEO?"
  }'
```

## Response

```json theme={null}
{
  "success": true,
  "answer": {
    "Citations": [],
    "Result": "OpenAI is an AI research and product company. Its CEO is Sam Altman."
  }
}
```

`answer` can be any non-null JSON value. The object above reflects the current upstream format, but clients should pass through or inspect the value dynamically instead of requiring `Citations`, `Result`, or a string.

If the workflow completes without a generated result, the response can use `success: false`:

```json theme={null}
{
  "success": false,
  "answer": {
    "answer": "No result generated from deep search"
  }
}
```


## OpenAPI

````yaml POST /v1/deep-search
openapi: 3.1.0
info:
  title: lev8 API
  version: '1.0'
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://app.lev8.com
security:
  - ApiKeyAuth: []
paths:
  /v1/deep-search:
    post:
      summary: Run deep search
      description: Answer a natural-language research question synchronously.
      operationId: runDeepSearch
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Optional stable key for this logical request. When omitted, lev8
            generates one and returns it in the response Header.
          schema:
            type: string
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeepSearchRequest'
            example:
              query: What does OpenAI do and who is its CEO?
      responses:
        '200':
          description: Deep Search answer.
          headers:
            Idempotency-Key:
              description: The supplied or server-generated idempotency key.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeepSearchResponse'
        '401':
          description: Missing or invalid API key.
        '402':
          description: Insufficient credits.
        '403':
          description: API key is forbidden or lacks Deep Search access.
        '409':
          description: >-
            Idempotency conflict or no completed response is available to
            replay.
        '422':
          description: Validation failed.
        '429':
          description: Concurrency limit reached.
        '500':
          description: Server error.
        '503':
          description: Deep Search is not enabled.
components:
  schemas:
    DeepSearchRequest:
      type: object
      additionalProperties: false
      required:
        - query
      properties:
        query:
          type: string
          minLength: 1
          maxLength: 4000
          description: Natural-language research question to answer with Deep Search.
          x-default: What does OpenAI do and who is its CEO?
          example: What does OpenAI do and who is its CEO?
    DeepSearchResponse:
      type: object
      additionalProperties: false
      required:
        - success
        - answer
      properties:
        success:
          type: boolean
          example: true
        answer:
          description: >-
            Any non-null JSON value returned by Deep Search. Clients must not
            assume a fixed string or object shape.
          type:
            - object
            - array
            - string
            - number
            - boolean
          example:
            Citations: []
            Result: >-
              OpenAI is an AI research and product company. Its CEO is Sam
              Altman.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      x-default: lev8_live_...

````