# Perplexity Sonar Deep Research

**API:** Data API

**Endpoint:** `POST /v1/beta/perplexity/sonar-deep-research`

**Tags:** Perplexity API

कई वेब सर्च और उद्धृत स्रोतों का उपयोग करके शोध रिपोर्ट जनरेट करें। model और messages आवश्यक हैं; इस endpoint के लिए model sonar-deep-research उपयोग करें। यह सार्वजनिक कॉन्ट्रैक्ट stream false के साथ non-streaming JSON responses कवर करता है। शोध में कई मिनट लग सकते हैं और यह gateway या client timeouts से अधिक हो सकता है। रिपोर्ट और उसके स्रोतों के लिए choices[].message.content, citations और search_results पढ़ें। usage Felo क्रेडिट शुल्क नहीं है।

### मूल्य संदर्भ

- मीटरिंग: रिपोर्ट किया गया response लागत
- संदर्भ request अनुमान: USD 0.23932
- संदर्भ ग्राहक गुणक: 1.0। निपटाई गई ग्राहक राशि पर इसे दोबारा लागू न करें।

यह केवल संदर्भ मेटाडेटा है — खाते का कोटेशन, गारंटीशुदा मूल्य या खर्च सीमा नहीं। रिसोर्स क्रेडिट Felo क्रेडिट नहीं हैं। अंतिम शुल्क Felo बिलिंग रिकॉर्ड के अनुसार लगते हैं।

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Request body

Required: **yes**

### application/json

Schema:

```json
{
  "type": "object",
  "required": [
    "model",
    "messages"
  ],
  "properties": {
    "model": {
      "type": "string",
      "description": "उपयोग करने के लिए Sonar मॉडल।",
      "enum": [
        "sonar",
        "sonar-pro",
        "sonar-reasoning-pro",
        "sonar-deep-research"
      ]
    },
    "messages": {
      "type": "array",
      "description": "अब तक की बातचीत को बनाने वाले messages की सूची।",
      "items": {
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "system",
              "user",
              "assistant"
            ],
            "description": "message लेखक की भूमिका।"
          },
          "content": {
            "type": "string",
            "description": "message का कंटेंट।"
          }
        }
      }
    },
    "max_tokens": {
      "type": "integer",
      "description": "response में जनरेट करने के लिए टोकन की अधिकतम संख्या।"
    },
    "temperature": {
      "type": "number",
      "description": "0 और 2 के बीच सैंपलिंग तापमान। कम मान आउटपुट को अधिक केंद्रित और नियतात्मक बनाते हैं।",
      "default": 0.2,
      "minimum": 0,
      "maximum": 2
    },
    "top_p": {
      "type": "number",
      "description": "न्यूक्लियस सैंपलिंग पैरामीटर। मॉडल top_p प्रायिकता द्रव्यमान वाले टोकन पर विचार करता है।",
      "default": 0.9,
      "minimum": 0,
      "maximum": 1
    },
    "top_k": {
      "type": "integer",
      "description": "top-k फ़िल्टरिंग के लिए रखने वाले टोकन की संख्या।",
      "default": 0,
      "minimum": 0,
      "maximum": 2048
    },
    "stream": {
      "type": "boolean",
      "description": "server-sent events का उपयोग करके response स्ट्रीम करना है या नहीं।",
      "default": false
    },
    "search_context": {
      "type": "string",
      "description": "नियंत्रित करता है कि कितना सर्च कॉन्टेक्स्ट उपयोग होगा। प्रति-request लागत को प्रभावित करता है।",
      "enum": [
        "low",
        "medium",
        "high"
      ],
      "default": "low"
    },
    "frequency_penalty": {
      "type": "number",
      "description": "अब तक के टेक्स्ट में मौजूद आवृत्ति के आधार पर नए टोकन पर दंड लगाता है। धनात्मक मान उसी पंक्ति को शब्दशः दोहराने की संभावना घटाते हैं।",
      "default": 1,
      "minimum": 0,
      "maximum": 2
    },
    "presence_penalty": {
      "type": "number",
      "description": "अब तक के टेक्स्ट में टोकन दिखने या न दिखने के आधार पर नए टोकन पर दंड लगाता है। धनात्मक मान नए विषयों पर बात करने की संभावना बढ़ाते हैं।",
      "default": 0,
      "minimum": -2,
      "maximum": 2
    },
    "return_citations": {
      "type": "boolean",
      "description": "response में उद्धरण और सर्च परिणाम लौटाने हैं या नहीं।",
      "default": true
    },
    "search_recency_filter": {
      "type": "string",
      "description": "सर्च परिणामों को नवीनता के अनुसार फ़िल्टर करें।",
      "enum": [
        "month",
        "week",
        "day",
        "hour"
      ]
    },
    "search_domain_filter": {
      "type": "array",
      "description": "खोज को विशिष्ट डोमेन तक सीमित करें।",
      "items": {
        "type": "string"
      }
    }
  }
}
```

Example:

```json
{
  "model": "sonar-deep-research",
  "messages": [
    {
      "role": "user",
      "content": "Research HTTP caching strategies for public APIs, with references to standards."
    }
  ],
  "max_tokens": 4096,
  "stream": false
}
```

## Responses

### 200 — AI उत्तर और उद्धरणों के साथ सफल response

Headers:
- `X-Request-Id` (string) — Felo सहायता से संपर्क करते समय शामिल करने के लिए request पहचानकर्ता।

**application/json**

Schema: `ResponseD5E2470Dd28B_ChatCompletionResponse` (`#/components/schemas/ResponseD5E2470Dd28B_ChatCompletionResponse`)

Example:

```json
{
  "id": "example-sonar-deep-research-completion",
  "model": "sonar-deep-research",
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Public API caching combines freshness controls and conditional requests. [1][2]"
      },
      "finish_reason": "stop"
    }
  ],
  "citations": [
    "https://www.rfc-editor.org/rfc/rfc9111.html",
    "https://www.rfc-editor.org/rfc/rfc9110.html"
  ],
  "search_results": [
    {
      "title": "HTTP Caching",
      "url": "https://www.rfc-editor.org/rfc/rfc9111.html"
    },
    {
      "title": "HTTP Semantics",
      "url": "https://www.rfc-editor.org/rfc/rfc9110.html"
    }
  ],
  "usage": {
    "prompt_tokens": 40,
    "completion_tokens": 80,
    "total_tokens": 120
  }
}
```

### 400 — request संसाधित नहीं किया जा सका। request पैरामीटर जाँचें।

### 401 — एक वैध Felo API key आवश्यक है।

### 402 — request आगे नहीं बढ़ सकता क्योंकि बिलिंग आवश्यकता पूरी नहीं हुई है।

### 403 — खाते को यह ऑपरेशन करने की अनुमति नहीं है।

### 429 — request या खर्च की सीमा तक पहुँच गए हैं।

### 502 — सेवा request पूरा नहीं कर सकी।

### 503 — API या बिलिंग सेवा अस्थायी रूप से उपलब्ध नहीं है।

### 504 — request संसाधित करते समय सेवा का समय समाप्त हो गया।

### default — त्रुटि response; upstream passthrough response प्रोवाइडर फ़ॉर्मेट का उपयोग कर सकते हैं।

**application/json**

Schema:

```json
{}
```

## Schema definitions

### ResponseD5E2470Dd28B_ChatCompletionResponse

`#/components/schemas/ResponseD5E2470Dd28B_ChatCompletionResponse`

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "completion का विशिष्ट पहचानकर्ता"
    },
    "model": {
      "type": "string",
      "description": "completion के लिए उपयोग किया गया मॉडल"
    },
    "object": {
      "type": "string",
      "example": "chat.completion"
    },
    "created": {
      "type": "integer",
      "description": "completion कब बनाया गया, इसका Unix टाइमस्टैम्प"
    },
    "choices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer"
          },
          "message": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string"
              },
              "content": {
                "type": "string",
                "description": "AI द्वारा जनरेट किया गया उत्तर, [1][2] जैसे इनलाइन उद्धरण संदर्भों के साथ"
              }
            }
          },
          "finish_reason": {
            "type": "string",
            "enum": [
              "stop",
              "length"
            ]
          }
        }
      }
    },
    "citations": {
      "type": "array",
      "description": "उत्तर में संदर्भित स्रोत URL की सूची",
      "items": {
        "type": "string"
      }
    },
    "search_results": {
      "type": "array",
      "description": "शीर्षक, स्निपेट और URL के साथ विस्तृत खोज परिणाम",
      "items": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "snippet": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        }
      }
    },
    "usage": {
      "type": "object",
      "properties": {
        "prompt_tokens": {
          "type": "integer"
        },
        "completion_tokens": {
          "type": "integer"
        },
        "total_tokens": {
          "type": "integer"
        },
        "search_context_size": {
          "type": "string"
        }
      }
    }
  }
}
```
