Skip to main content
POST
/
smart
Returns quick, reliable answers for a variety of questions
curl --request POST \
  --url https://chat-api.you.com/smart \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "query": "<string>",
  "chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "instructions": "<string>"
}'
{
  "answer": "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": [
    {
      "url": "https://en.wikipedia.org/wiki/Solar_eclipse",
      "name": "Solar eclipse - Wikipedia",
      "snippet": "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.\nIn 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.\nIf 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 ..."
    }
  ]
}
Before You Get StartedTo register for usage of our Smart API, please reach out via email at api@you.com.

Authorizations

X-API-Key
string
header
required

A unique API Key required to authorize API access. Ensure it is kept confidential. Get a free API Key at you.com/platform.

Body

application/json
query
string

The main question or statement to be answered. This input directs the scope and context of the response.

chat_id
string<uuid>

A hexadecimal UUID to maintain continuity within the conversation. This can be a randomly generated string that uniquely identifies the session.

instructions
string

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.

Response

200 - application/json

A JSON object containing a dictionary with the answer and a list of search results

answer
string

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
object[]
I