changedInput schema / properties / body / items / oneOf
Previous value: -[
- {
- "example": [
- {
- "max_output_tokens": 200,
- "message_chain": [
- {
- "message": "Hello, what’s up?",
- "role": "user"
- },
- {
- "message": "Hello! I’m doing well, thank you. How can I assist you today? Are there any specific topics or projects you’d like to discuss in our meeting?",
- "role": "ai"
- }
- ],
- "model_name": "sonar",
- "system_message": "communicate as if we are in a business meeting",
- "temperature": 0.3,
- "top_p": 0.5,
- "user_prompt": "provide information on how relevant the amusement park business is in France now",
- "web_search_country_iso_code": "FR"
- }
- ],
- "properties": {
- "max_output_tokens": {
- "description": "<em>maximum number of tokens in the AI response</em><br>optional field<br>minimum value: <code>1</code><br>maximum value: <code>4096</code>;<br>default value: <code>2048</code>;<br><strong>Note:</strong> if the reasoning model is specified in the request, the output token count may exceed the specified <code>max_output_tokens</code> limit",
- "type": [
- "integer",
- "null"
- ]
- },
- "message_chain": {
- "description": "conversation history\noptional field\narray of message objects representing previous conversation turns;\neach object must contain:\nrole string with either user or ai role;\nmessage string with message content (max 500 characters);\nyou can specify maximum of 10 message objects in the array;\nNote: for Perplexity models, messages must strictly alternate between user and AI roles (user → ai);\nexample:\n\"message_chain\": [{\"role\":\"user\",\"message\":\"Hello, what’s up?\"},{\"role\":\"ai\",\"message\":\"Hello! I’m doing well, thank you. How can I assist you today?\"}]",
- "items": {
- "oneOf": [
- {
- "properties": {
- "message": {
- "description": "message text",
- "type": [
- "string",
- "null"
- ]
- },
- "role": {
- "description": "role of the user from whom the message originates",
- "type": [
- "string",
- "null"
- ]
- }
- },
- "type": "object"
- }
- ],
- "type": [
- "object",
- "null"
- ]
- },
- "type": [
- "array",
- "null"
- ]
- },
- "model_name": {
- "description": "<em>name of the AI model</em><br><strong>required field</strong><br><code>model_name</code >consists of the actual model name and version name;<br>if the basic model name is specified, its latest version will be set by default;<br>you can receive the list of available LLM models by making a separate request to the following endpoint: <code>https://api.dataforseo.com/v3/ai_optimization/perplexity/llm_responses/models</code>",
- "type": "string"
- },
- "system_message": {
- "description": "<em>instructions for the AI behavior</em><br>optional field<br>defines the AI's role, tone, or specific behavior <br>you can specify <strong>up to 500 characters</strong> in the <code>system_message</code> field",
- "type": [
- "string",
- "null"
- ]
- },
- "tag": {
- "description": "<em>user-defined task identifier</em><br>optional field<br><em>the character limit is 255</em><br>you can use this parameter to identify the task and match it with the result<br>you will find the specified <code>tag</code> value in the <code>data</code> object of the response",
- "type": [
- "string",
- "null"
- ]
- },
- "temperature": {
- "description": "<em>randomness of the AI response</em><br>optional field<br>higher values make output more diverse <br>lower values make output more focused<br>minimum value: <code>0</code><br>maximum value: <code>1.9</code><br>default value: <code>0.77</code>",
- "type": [
- "number",
- "null"
- ]
- },
- "top_p": {
- "description": "<em>diversity of the AI response</em><br>optional field <br>controls diversity of the response by limiting token selection<br>minimum value: <code>0</code><br>maximum value: <code>1</code> <br>default value: <code>0.9</code>",
- "type": [
- "number",
- "null"
- ]
- },
- "user_prompt": {
- "description": "<em>prompt for the AI model</em><br><strong>required field</strong><br>the question or task you want to send to the AI model;<br>you can specify <strong>up to 500 characters</strong> in the <code>user_prompt</code> field",
- "type": "string"
- },
- "web_search_country_iso_code": {
- "description": "<em>country code for web search localization</em><br>optional field<br>specify the country ISO code to get localized web search results<br><strong>Note:</strong> available only for Perplexity Sonar models<br>example: <code>US</code>",
- "type": [
- "string",
- "null"
- ]
- }
- },
- "type": "object"
- }
-]New value: +[
+ {
+ "properties": {
+ "max_output_tokens": {
+ "description": "<em>maximum number of tokens in the AI response</em><br>optional field<br>minimum value: <code>1</code><br>maximum value: <code>4096</code>;<br>default value: <code>2048</code>;<br><strong>Note:</strong> if the reasoning model is specified in the request, the output token count may exceed the specified <code>max_output_tokens</code> limit",
+ "type": [
+ "integer",
+ "null"
+ ]
+ },
+ "message_chain": {
+ "description": "conversation history\noptional field\narray of message objects representing previous conversation turns;\neach object must contain:\nrole string with either user or ai role;\nmessage string with message content (max 500 characters);\nyou can specify maximum of 10 message objects in the array;\nNote: for Perplexity models, messages must strictly alternate between user and AI roles (user → ai);\nexample:\n\"message_chain\": [{\"role\":\"user\",\"message\":\"Hello, what’s up?\"},{\"role\":\"ai\",\"message\":\"Hello! I’m doing well, thank you. How can I assist you today?\"}]",
+ "items": {
+ "oneOf": [
+ {
+ "properties": {
+ "message": {
+ "description": "message text",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "role": {
+ "description": "role of the user from whom the message originates",
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ }
+ ],
+ "type": [
+ "object",
+ "null"
+ ]
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ },
+ "model_name": {
+ "description": "<em>name of the AI model</em><br><strong>required field</strong><br><code>model_name</code >consists of the actual model name and version name;<br>if the basic model name is specified, its latest version will be set by default;<br>you can receive the list of available LLM models by making a separate request to the following endpoint: <code>https://api.dataforseo.com/v3/ai_optimization/perplexity/llm_responses/models</code>",
+ "type": "string"
+ },
+ "system_message": {
+ "description": "<em>instructions for the AI behavior</em><br>optional field<br>defines the AI's role, tone, or specific behavior <br>you can specify <strong>up to 500 characters</strong> in the <code>system_message</code> field",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "tag": {
+ "description": "<em>user-defined task identifier</em><br>optional field<br><em>the character limit is 255</em><br>you can use this parameter to identify the task and match it with the result<br>you will find the specified <code>tag</code> value in the <code>data</code> object of the response",
+ "type": [
+ "string",
+ "null"
+ ]
+ },
+ "temperature": {
+ "description": "<em>randomness of the AI response</em><br>optional field<br>higher values make output more diverse <br>lower values make output more focused<br>minimum value: <code>0</code><br>maximum value: <code>1.9</code><br>default value: <code>0.77</code>",
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "top_p": {
+ "description": "<em>diversity of the AI response</em><br>optional field <br>controls diversity of the response by limiting token selection<br>minimum value: <code>0</code><br>maximum value: <code>1</code> <br>default value: <code>0.9</code>",
+ "type": [
+ "number",
+ "null"
+ ]
+ },
+ "user_prompt": {
+ "description": "<em>prompt for the AI model</em><br><strong>required field</strong><br>the question or task you want to send to the AI model;<br>you can specify <strong>up to 500 characters</strong> in the <code>user_prompt</code> field",
+ "type": "string"
+ },
+ "web_search_country_iso_code": {
+ "description": "<em>country code for web search localization</em><br>optional field<br>specify the country ISO code to get localized web search results<br><strong>Note:</strong> available only for Perplexity Sonar models<br>example: <code>US</code>",
+ "type": [
+ "string",
+ "null"
+ ]
+ }
+ },
+ "type": "object"
+ }
+]