{
  "service": "perplexity",
  "displayName": "Perplexity",
  "categories": [
    "AI"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "PPLX_API_KEY",
      "description": "Perplexity API key used with the Authorization Bearer header. Generate it in Settings > </> API: https://www.perplexity.ai/help-center/en/articles/10352995-api-settings",
      "extraFields": []
    }
  ],
  "homepageUrl": "https://www.perplexity.ai",
  "actions": [
    {
      "id": "perplexity.create_chat_completion",
      "service": "perplexity",
      "name": "create_chat_completion",
      "description": "Create a Perplexity Sonar chat completion grounded by web search when enabled.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "description": "The Sonar model to use for the chat completion."
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "system",
                    "user",
                    "assistant"
                  ],
                  "description": "The role of the message author."
                },
                "content": {
                  "type": "string",
                  "description": "The plain-text message content."
                }
              },
              "additionalProperties": false,
              "description": "A chat message."
            },
            "description": "The ordered conversation messages.",
            "minItems": 1
          },
          "max_tokens": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of tokens to generate."
          },
          "temperature": {
            "type": "number",
            "minimum": 0,
            "maximum": 2,
            "description": "The sampling temperature for generation."
          },
          "top_p": {
            "type": "number",
            "minimum": 0,
            "maximum": 1,
            "description": "The nucleus sampling threshold."
          },
          "top_k": {
            "type": "integer",
            "minimum": 0,
            "description": "The number of top tokens to consider per step."
          },
          "stream": {
            "type": "boolean",
            "description": "Whether to stream the response. This connector only accepts false or an omitted value."
          },
          "return_images": {
            "type": "boolean",
            "description": "Whether to include image references in the response."
          },
          "return_citations": {
            "type": "boolean",
            "description": "Whether to include citations in the response."
          },
          "disable_search": {
            "type": "boolean",
            "description": "Whether to disable web search grounding for this request."
          },
          "search_domain_filter": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A domain or URL prefix used to limit web search."
            },
            "description": "Only search within these domains or URL prefixes."
          },
          "search_recency_filter": {
            "type": "string",
            "description": "A recency filter such as day, week, month, or year."
          },
          "presence_penalty": {
            "type": "number",
            "minimum": -2,
            "maximum": 2,
            "description": "The penalty applied to tokens that have already appeared."
          },
          "frequency_penalty": {
            "type": "number",
            "minimum": 0,
            "maximum": 2,
            "description": "The penalty applied based on token frequency."
          }
        },
        "additionalProperties": false,
        "required": [
          "model",
          "messages"
        ],
        "description": "The input payload for the Perplexity chat completion action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The completion identifier."
          },
          "model": {
            "type": "string",
            "description": "The model that generated the completion."
          },
          "created": {
            "type": "integer",
            "description": "The Unix timestamp when the completion was created."
          },
          "choices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "index": {
                  "type": "integer",
                  "description": "The choice index."
                },
                "finish_reason": {
                  "type": "string",
                  "description": "The reason why generation stopped."
                },
                "message": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "type": "string",
                      "description": "The role of the generated message."
                    },
                    "content": {
                      "type": "string",
                      "description": "The generated message content."
                    }
                  },
                  "additionalProperties": true,
                  "description": "The generated message."
                }
              },
              "additionalProperties": true,
              "description": "A single generated completion choice."
            },
            "description": "The completion choices."
          },
          "citations": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A citation URL returned with the response."
            },
            "description": "The citation URLs referenced by the answer."
          },
          "search_results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "description": "The search result title."
                },
                "url": {
                  "type": "string",
                  "description": "The canonical URL of the result."
                },
                "snippet": {
                  "type": "string",
                  "description": "A short snippet extracted from the result page."
                },
                "date": {
                  "type": "string",
                  "description": "The published date reported for the result."
                },
                "last_updated": {
                  "type": "string",
                  "description": "The last updated date reported for the result."
                }
              },
              "additionalProperties": true,
              "description": "A raw search result returned by Perplexity."
            },
            "description": "The search results used to ground the response."
          },
          "usage": {
            "type": "object",
            "properties": {
              "prompt_tokens": {
                "type": "integer",
                "description": "The number of prompt tokens consumed."
              },
              "completion_tokens": {
                "type": "integer",
                "description": "The number of completion tokens generated."
              },
              "total_tokens": {
                "type": "integer",
                "description": "The total number of tokens consumed."
              }
            },
            "additionalProperties": true,
            "description": "Token usage metadata for the completion."
          }
        },
        "additionalProperties": true,
        "required": [
          "choices"
        ],
        "description": "The response payload for the chat completion action."
      }
    },
    {
      "id": "perplexity.create_embeddings",
      "service": "perplexity",
      "name": "create_embeddings",
      "description": "Generate vector embeddings for one or more input strings with Perplexity.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string",
            "enum": [
              "pplx-embed-v1-0.6b",
              "pplx-embed-v1-4b"
            ],
            "description": "The embedding model identifier."
          },
          "input": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "One or more input strings to embed."
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "description": "One input string to embed."
                },
                "description": "One input string to embed.",
                "minItems": 1,
                "maxItems": 512
              }
            ],
            "description": "One or more input strings to embed."
          },
          "dimensions": {
            "type": "integer",
            "description": "The target embedding dimension count."
          },
          "encoding_format": {
            "type": "string",
            "enum": [
              "base64_int8",
              "base64_binary"
            ],
            "description": "The output encoding format for embeddings."
          }
        },
        "additionalProperties": false,
        "required": [
          "model",
          "input"
        ],
        "description": "The input payload for the embeddings action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "description": "The top-level object type."
          },
          "model": {
            "type": "string",
            "description": "The embedding model that generated the output."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "object": {
                  "type": "string",
                  "description": "The object type for the embedding item."
                },
                "index": {
                  "type": "integer",
                  "description": "The zero-based embedding index."
                },
                "embedding": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "number",
                        "description": "One embedding vector value."
                      },
                      "description": "The numeric embedding vector."
                    },
                    {
                      "type": "string",
                      "description": "The encoded embedding value."
                    }
                  ],
                  "description": "The embedding payload."
                }
              },
              "additionalProperties": true,
              "description": "A single embedding item."
            },
            "description": "The generated embeddings."
          },
          "usage": {
            "type": "object",
            "properties": {
              "prompt_tokens": {
                "type": "integer",
                "description": "The number of prompt tokens consumed."
              },
              "total_tokens": {
                "type": "integer",
                "description": "The total number of tokens consumed."
              }
            },
            "additionalProperties": true,
            "description": "Usage information for the embeddings request."
          }
        },
        "additionalProperties": true,
        "required": [
          "data"
        ],
        "description": "The response payload for the embeddings action."
      }
    },
    {
      "id": "perplexity.list_models",
      "service": "perplexity",
      "name": "list_models",
      "description": "List the models currently available from Perplexity.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false,
        "description": "No input parameters are required for this action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "description": "The top-level object type."
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The model identifier."
                },
                "object": {
                  "type": "string",
                  "description": "The object type returned by the API."
                },
                "created": {
                  "type": "integer",
                  "description": "The Unix timestamp when the model metadata was created."
                },
                "owned_by": {
                  "type": "string",
                  "description": "The organization or owner that provides the model."
                },
                "type": {
                  "type": "string",
                  "description": "The model family or type."
                }
              },
              "additionalProperties": true,
              "required": [
                "id"
              ],
              "description": "A Perplexity model entry."
            },
            "description": "The list of available models."
          }
        },
        "additionalProperties": true,
        "required": [
          "data"
        ],
        "description": "The response payload for listing Perplexity models."
      }
    },
    {
      "id": "perplexity.search",
      "service": "perplexity",
      "name": "search",
      "description": "Search the web and return ranked raw results from Perplexity without LLM synthesis.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "One or more raw web search queries."
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "description": "One raw web search query."
                },
                "description": "One raw web search query.",
                "minItems": 1
              }
            ],
            "description": "One or more raw web search queries."
          },
          "country": {
            "type": "string",
            "minLength": 2,
            "maxLength": 2,
            "description": "The ISO 3166-1 alpha-2 country code used to localize search results."
          },
          "max_results": {
            "type": "integer",
            "minimum": 1,
            "maximum": 20,
            "description": "The maximum number of search results to return."
          },
          "search_after_date": {
            "type": "string",
            "description": "Only return content published after this date, for example 01/15/2024."
          },
          "search_before_date": {
            "type": "string",
            "description": "Only return content published before this date, for example 12/31/2024."
          },
          "max_tokens_per_page": {
            "type": "integer",
            "minimum": 1,
            "description": "The maximum number of tokens to retrieve from each webpage."
          },
          "search_domain_filter": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "A domain or URL prefix used to filter results."
            },
            "description": "Only return search results from these domains or URL prefixes.",
            "maxItems": 20
          }
        },
        "additionalProperties": false,
        "required": [
          "query"
        ],
        "description": "The input payload for the raw Perplexity web search action."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "description": "The search result title."
                },
                "url": {
                  "type": "string",
                  "description": "The canonical URL of the result."
                },
                "snippet": {
                  "type": "string",
                  "description": "A short snippet extracted from the result page."
                },
                "date": {
                  "type": "string",
                  "description": "The published date reported for the result."
                },
                "last_updated": {
                  "type": "string",
                  "description": "The last updated date reported for the result."
                }
              },
              "additionalProperties": true,
              "description": "A raw search result returned by Perplexity."
            },
            "description": "The ranked raw search results."
          }
        },
        "additionalProperties": true,
        "description": "The response payload for the raw search action."
      }
    }
  ]
}
