perplexity

tag
  1. API
  2. AI
name
perplexity
Perplexity API 발급 링크 (결제수단 등록 후 최소 $3 충전 후에만 API_KEY 발급가능)
n8n 설정값
Method : POST
Authentication : Generic Credential Type
Generic Auth Type : Header Auth
Header Auth Name : Authorization
Header Auth Value : Bearer <API_TOKEN>
Send Headers : Enable
Using Fields Below
Name : Content-Type
Value : application/json
Name : accept
Value : application/json
Send Body : Enable
Body Content Type : JSON
Specify Body : Using JSON
{
  "model": "llama-3.1-sonar-small-128k-online",
  "messages": [
    {
      "role": "system",
      "content": "Be precise and concise."
    },
    {
      "role": "user",
      "content": "How many stars are there in our galaxy?"
    }
  ],
  "max_tokens": 1000,
  "temperature": 0.2,
  "top_p": 0.9,
  "return_citations": true,
  "search_domain_filter": [
    "perplexity.ai"
  ],
  "return_images": false,
  "return_related_questions": false,
  "search_recency_filter": "month",
  "top_k": 0,
  "stream": false,
  "presence_penalty": 0,
  "frequency_penalty": 1
}