Felo API PlatformFelo API Platform
v0.1.0-beta
OpenAPI 3.1.0

Perplexity Sonar Reasoning Pro

Server:https://openapi.felo.ai
Client Libraries

Perplexity API

​

Generate answers and research reports with web citations.

Perplexity Sonar Reasoning Pro

​

Analyze a question requiring reasoning supported by web search and citations. model and messages are required; use model sonar-reasoning-pro for this endpoint. This public contract covers non-streaming JSON responses with stream false. Read choices[].message.content, citations and search_results for the answer and its sources. usage is not a Felo credit charge.

Body·ChatCompletionRequest
required
application/json
  • messages
    Type: array object[]
    required

    A list of messages comprising the conversation so far.

    • content
      Type: string
      required

      The content of the message.

    • role
      Type: string enum
      required

      The role of the message author.

      values
      • system
      • user
      • assistant
  • model
    Type: string enum
    required

    The Sonar model to use.

    values
    • sonar
    • sonar-pro
    • sonar-reasoning-pro
    • sonar-deep-research
  • frequency_penalty
    Type: number
    min:  
    0
    max:  
    2

    Penalizes new tokens based on their existing frequency in the text so far. Positive values decrease the likelihood of repeating the same line verbatim.

  • max_tokens
    Type: integer

    The maximum number of tokens to generate in the response.

  • presence_penalty
    Type: number
    min:  
    -2
    max:  
    2

    Penalizes new tokens based on whether they appear in the text so far. Positive values increase the likelihood of talking about new topics.

  • return_citations
    Type: boolean

    Whether to return citations and search results in the response.

  • search_context
    Type: string enum

    Controls how much search context to use. Affects per-request cost.

    values
    • low
    • medium
    • high
  • search_domain_filter
    Type: array string[]

    Limit search to specific domains.

  • search_recency_filter
    Type: string enum

    Filter search results by recency.

    values
    • month
    • week
    • day
    • hour
  • stream
    Type: boolean enum
    const:  
    false

    Only non-streaming JSON responses are covered by this public contract. Set false.

    values
    • false
  • temperature
    Type: number
    min:  
    0
    max:  
    2

    Sampling temperature between 0 and 2. Lower values make output more focused and deterministic.

  • top_k
    Type: integer
    min:  
    0
    max:  
    2048

    The number of tokens to keep for top-k filtering.

  • top_p
    Type: number
    min:  
    0
    max:  
    1

    Nucleus sampling parameter. The model considers tokens with top_p probability mass.

Responses
  • 200
    Type: object · ChatCompletionResponse

    Successful response with AI answer and citations

    • choices
      Type: array object[]
      • finish_reason
        Type: string enum
        values
        • stop
        • length
      • index
        Type: integer

        Integer numbers.

      • message
        Type: object
        • content
          Type: string

          The AI-generated answer, with inline citation references like [1][2].

        • role
          Type: string
    • citations
      Type: array string[]

      List of source URLs referenced in the answer.

    • created
      Type: integer

      Unix timestamp of when the completion was created.

    • id
      Type: string

      Unique identifier for the completion.

    • model
      Type: string

      The model used for the completion.

    • object
      Type: string
    • search_results
      Type: array object[]

      Detailed search results with titles, snippets, and URLs.

      • date
        Type: string
      • snippet
        Type: string
      • source
        Type: string
      • title
        Type: string
      • url
        Type: string
    • usage
      Type: object
      • completion_tokens
        Type: integer

        Integer numbers.

      • prompt_tokens
        Type: integer

        Integer numbers.

      • search_context_size
        Type: string
      • total_tokens
        Type: integer

        Integer numbers.

    application/json
  • 400

    The request could not be processed. Check the request parameters.

  • 401

    A valid Felo API key is required.

  • 402

    The request cannot proceed because a billing requirement is not met.

  • 403

    The account is not permitted to perform this operation.

  • 429

    A request or spending limit has been reached.

  • 502

    The service could not complete the request.

  • 503

    The API or billing service is temporarily unavailable.

  • 504

    The service timed out while processing the request.

  • default

    The operation failed. Keep the response request ID when contacting Felo support.

Request Example for post/v1/beta/perplexity/sonar-reasoning-pro
curl --request POST https://openapi.felo.ai/v1/beta/perplexity/sonar-reasoning-pro \
  --header "Authorization: Bearer ${FELO_API_KEY:?Set FELO_API_KEY}" \
  --header 'Content-Type: application/json' \
  --data '{"model": "sonar-reasoning-pro", "messages": [{"role": "user", "content": "Explain when conditional HTTP requests save bandwidth, citing the standards."}], "max_tokens": 2048, "stream": false}'
{
  "id": "example-sonar-reasoning-pro-completion",
  "model": "sonar-reasoning-pro",
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "A successful cache validation can avoid transferring an unchanged body. [1]"
      },
      "finish_reason": "stop"
    }
  ],
  "citations": [
    "https://www.rfc-editor.org/rfc/rfc9110.html"
  ],
  "search_results": [
    {
      "title": "HTTP Semantics",
      "url": "https://www.rfc-editor.org/rfc/rfc9110.html"
    }
  ],
  "usage": {
    "prompt_tokens": 30,
    "completion_tokens": 50,
    "total_tokens": 80
  }
}
Perplexity Sonar Reasoning Pro