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

# Smart API (Legacy)

<Note>
  **Before You Get Started**

  To register for usage of our Smart API, please reach out via email at [api@you.com](mailto:api@you.com).
</Note>


## OpenAPI

````yaml openapi_chat POST /smart
openapi: 3.0.0
info:
  title: You.com APIs
  description: CHAT WITH THE BEST, CHAT WITH YOU!
  version: 0.0.1
servers:
  - url: https://chat-api.you.com
security:
  - ApiKeyAuth: []
paths:
  /smart:
    post:
      summary: Returns quick, reliable answers for a variety of questions
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                  description: >-
                    The main question or statement to be answered. This input
                    directs the scope and context of the response.
                chat_id:
                  type: string
                  description: >-
                    A hexadecimal `UUID` to maintain continuity within the
                    conversation. This can be a randomly generated string that
                    uniquely identifies the session.
                  format: uuid
                instructions:
                  type: string
                  description: >-
                    Custom commands that allow you to tailor the responses to
                    meet specific requirements or preferences. By providing
                    detailed instructions, you can control the assistant’s
                    *tone, style, format, depth of information,* and other
                    response characteristics. This enables you to customize
                    responses for different audiences, contexts, or purposes.
                    Instructions up to `2.5K characters` are supported by
                    default. For longer instructions—up to `25K
                    characters`—custom pricing is available upon request at
                    **api@you.com**.
      responses:
        '200':
          description: >-
            A JSON object containing a dictionary with the answer and a list of
            search results
          content:
            application/json:
              schema:
                type: object
                properties:
                  answer:
                    type: string
                    description: >-
                      The main response generated by the API based on the
                      provided `query` and `instructions`.
                    example: >-
                      A solar eclipse occurs when the Moon passes between the
                      Sun and Earth, casting a shadow on Earth and blocking the
                      Sun's light either partially or completely ...
                  search_results:
                    type: array
                    items:
                      type: object
                      properties:
                        url:
                          type: string
                          description: The URL of the specific search result.
                          example: https://en.wikipedia.org/wiki/Solar_eclipse
                        name:
                          type: string
                          description: The title or name of the search result.
                          example: Solar eclipse - Wikipedia
                        snippet:
                          type: string
                          description: >-
                            A brief summary or description of the search result
                            content.
                          example: >-
                            A solar eclipse occurs when the Moon passes between
                            Earth and the Sun, thereby obscuring the view of the
                            Sun from a small part of Earth, totally or
                            partially. Such an alignment occurs approximately
                            every six months, during the eclipse season in its
                            new moon phase, when the Moon's orbital plane is
                            closest to the plane of Earth's orbit.

                            In partial and annular eclipses, only part of the
                            Sun is obscured. Unlike a lunar eclipse, which may
                            be viewed from anywhere on the night side of Earth,
                            a solar eclipse can only be viewed from a relatively
                            small area of the world. As such, although total
                            solar eclipses occur somewhere on Earth every 18
                            months on average, they recur at any given place
                            only once every 360 to 410 years.

                            If the Moon were in a perfectly circular orbit and
                            in the same orbital plane as Earth, there would be
                            total solar eclipses once a month, at every new
                            moon. Instead, because the Moon's orbit is tilted at
                            about 5 degrees to Earth's orbit, its shadow usually
                            misses Earth ...
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        A unique API Key required to authorize API access. Ensure it is kept
        confidential. Get a free API Key at you.com/platform.

````