> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# दस्तावेज़ों को फिर से रैंक करें

> समर्थित री-रैंकिंग मॉडल से क्वेरी के लिए प्रासंगिकता के आधार पर दस्तावेज़ क्रमबद्ध करें।

उम्मीदवार दस्तावेज़ों को खोज, पुनर्प्राप्ति या जनरेशन चरण में भेजने से पहले क्रमबद्ध करने के लिए इस एंडपॉइंट का उपयोग करें।

डिप्लॉयमेंट से पहले `GET /v1/models` में मॉडल सत्यापित करें। डिफ़ॉल्ट प्रतिक्रिया में केवल सार्वजनिक Gateway रूट वाले मॉडल होते हैं।


## OpenAPI

````yaml hi/openapi/v1/openapi.localized.yaml POST /rerank
openapi: 3.0.3
info:
  title: Phaseo Gateway API
  description: >-
    OpenAI-संगत एंडपॉइंट के माध्यम से विभिन्न AI मॉडल तक पहुँचने के लिए एक गेटवे
    API।
  version: 1.0.0
  contact:
    name: Phaseo
    url: https://phaseo.app
    email: danielbutler500@gmail.com
servers:
  - url: https://api.phaseo.app/v1
    description: वैश्विक रूटिंग
security:
  - BearerAuth: []
tags:
  - name: Gateway
    description: Core Phaseo Gateway operations.
paths:
  /rerank:
    post:
      tags:
        - Gateway
      summary: दस्तावेज़ों को पुनः क्रमित करें
      description: >-
        क्वेरी के संदर्भ में प्रासंगिकता के आधार पर दस्तावेज़ों की सूची को पुनः
        क्रमित करता है।
      operationId: createRerank
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RerankRequest'
      responses:
        '200':
          description: पुनः क्रमित करने की प्रतिक्रिया
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RerankResponse'
components:
  schemas:
    RerankRequest:
      type: object
      required:
        - model
        - query
        - documents
      properties:
        model:
          type: string
        query:
          type: string
        documents:
          oneOf:
            - type: array
              minItems: 1
              items:
                type: string
            - type: array
              minItems: 1
              items:
                type: object
                additionalProperties: true
        top_n:
          type: integer
          minimum: 1
        top_k:
          type: integer
          minimum: 1
          description: '`top_n` का alias।'
        return_documents:
          type: boolean
        max_chunks_per_doc:
          type: integer
          minimum: 1
        rank_fields:
          type: array
          items:
            type: string
        user:
          type: string
        metadata:
          type: object
          additionalProperties:
            type: string
        provider_options:
          type: object
          additionalProperties: true
        debug:
          $ref: '#/components/schemas/DebugOptions'
        provider:
          $ref: '#/components/schemas/ProviderRoutingOptions'
    RerankResponse:
      type: object
      properties:
        object:
          type: string
        id:
          type: string
        nativeResponseId:
          type: string
          nullable: true
        model:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/RerankResult'
        usage:
          $ref: '#/components/schemas/Usage'
    DebugOptions:
      type: object
      description: गेटवे डिबग नियंत्रण। ये फ़्लैग कभी भी प्रदाता को फ़ॉरवर्ड नहीं किए जाते।
      properties:
        enabled:
          type: boolean
        return_upstream_request:
          type: boolean
        return_upstream_response:
          type: boolean
        trace:
          type: boolean
        trace_level:
          type: string
          enum:
            - summary
            - full
    ProviderRoutingOptions:
      type: object
      description: गेटवे चयन के लिए प्रदाता रूटिंग प्राथमिकताएँ।
      properties:
        order:
          type: array
          items:
            type: string
        only:
          type: array
          items:
            type: string
        ignore:
          type: array
          items:
            type: string
        include_alpha:
          type: boolean
          description: रूटिंग में alpha प्रदाताओं को शामिल करें (डिफ़ॉल्ट रूप से बंद)।
        allow_fallbacks:
          type: boolean
          nullable: true
          description: विफलता के बाद किसी अन्य योग्य प्रदाता पर fallback की अनुमति दें।
        require_parameters:
          type: boolean
          nullable: true
          description: >-
            रूटिंग से पहले अनुरोधित पैरामीटरों के लिए प्रदाता का समर्थन आवश्यक
            करें।
        required_execution_region:
          type: string
          nullable: true
          description: रूटिंग को अनुरोधित execution region वाले प्रदाताओं तक सीमित करें।
        required_data_region:
          type: string
          nullable: true
          description: रूटिंग को अनुरोधित data region वाले प्रदाताओं तक सीमित करें।
        require_zero_data_retention:
          type: boolean
          nullable: true
          description: >-
            रूटिंग को उन प्रदाताओं तक सीमित करें जो शून्य डेटा प्रतिधारण का
            समर्थन करते हैं।
        data_collection:
          type: string
          nullable: true
          enum:
            - allow
            - deny
        zdr:
          type: boolean
          nullable: true
        enforce_distillable_text:
          type: boolean
          nullable: true
        quantizations:
          type: array
          nullable: true
          items:
            type: string
        sort:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          description: >-
            इस अनुरोध के लिए प्रदाताओं को क्रम दें, जैसे कीमत, विलंबता या
            थ्रूपुट के आधार पर।
        max_price:
          type: object
          properties:
            prompt:
              oneOf:
                - type: number
                - type: string
            completion:
              oneOf:
                - type: number
                - type: string
            image:
              oneOf:
                - type: number
                - type: string
            audio:
              oneOf:
                - type: number
                - type: string
            request:
              oneOf:
                - type: number
                - type: string
        preferred_min_throughput:
          oneOf:
            - type: number
            - type: object
              additionalProperties:
                type: number
        preferred_max_latency:
          oneOf:
            - type: number
            - type: object
              additionalProperties:
                type: number
    RerankResult:
      type: object
      properties:
        index:
          type: integer
        relevance_score:
          type: number
        document:
          $ref: '#/components/schemas/RerankDocument'
    Usage:
      type: object
      properties:
        prompt_tokens:
          type: integer
        completion_tokens:
          type: integer
        total_tokens:
          type: integer
        server_tool_use:
          $ref: '#/components/schemas/ServerToolUsage'
    RerankDocument:
      oneOf:
        - type: string
        - type: object
          additionalProperties: true
    ServerToolUsage:
      type: object
      properties:
        datetime_requests:
          type: integer
          minimum: 0
        web_search_requests:
          type: integer
          minimum: 0
        subagent_requests:
          type: integer
          minimum: 0
        fusion_requests:
          type: integer
          minimum: 0
        search_models_requests:
          type: integer
          minimum: 0
        web_fetch_requests:
          type: integer
          minimum: 0
        advisor_requests:
          type: integer
          minimum: 0
        image_generation_requests:
          type: integer
          minimum: 0
        apply_patch_requests:
          type: integer
          minimum: 0
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer टोकन से प्रमाणीकरण

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.