For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Go to Platform
HomeSDKs & toolsAPI referencePricing
  • API reference
      • GETSearch
      • POSTSearch
      • POSTContents
      • POSTResearch
      • POSTFinance Research
  • Error handling
    • Error code reference
        • GETLive News
        • GETImages
          • STREAMExpress Agent
          • STREAMCustom Agent
          • STREAMAdvanced Agent
LogoLogo
HomeSDKs & toolsAPI referencePricing
LogoLogo
Go to Platform
Custom solutionsAgents

Express Agent

Beta
|View as Markdown|Open in Claude|
POST
https://api.you.com/v1/agents/runs
POST
/v1/agents/runs
$curl -X POST https://api.you.com/v1/agents/runs \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "agent": "express",
> "input": "What is the capital of France?",
> "stream": false
>}'
1{
2 "agent": "express",
3 "input": [
4 {
5 "role": "user",
6 "content": "What is the capital of France?"
7 }
8 ],
9 "output": [
10 {
11 "type": "web_search.results",
12 "content": [
13 {
14 "source_type": "web_search",
15 "citation_uri": "https://en.wikipedia.org/wiki/Paris",
16 "title": "Paris - Wikipedia",
17 "snippet": "Paris is the capital and largest city of France, with an estimated city center population of 2,048,472, and a metropolitan population of 13,171,056 as of ...",
18 "url": "https://en.wikipedia.org/wiki/Paris",
19 "provider": null,
20 "thumbnail_url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSuabbjyTSQdm08in1kajd3LW1841TxBxaHjERnGccFRjyxmT-SCDF4Ces&s"
21 }
22 ]
23 },
24 {
25 "type": "message.answer",
26 "text": "#### Capital of France\n\nThe capital of France is **Paris**. It is not only the capital but also the most populous city in the country. Paris is situated on the Seine River in the northern part of France, within the Île-de-France region. It serves as the main cultural, economic, and political center of France [[1]](https://www.coe.int/en/web/interculturalcities/paris)[[2]](https://en.wikipedia.org/wiki/Paris)."
27 }
28 ]
29}
This endpoint answers the user’s query with an LLM. Optionally, you can ground the answer using web results (max 1 web search). Use it for answering simple questions that require a low latency response. The data returns as a JSON payload with a `application/json` content type <Note>The call only returns when the agent has finished fully responding to the input question.</Note>
Was this page helpful?
Built with

This endpoint answers the user’s query with an LLM. Optionally, you can ground the answer using web results (max 1 web search).

Use it for answering simple questions that require a low latency response.

The data returns as a JSON payload with a application/json content type

The call only returns when the agent has finished fully responding to the input question.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
agentenumRequired
Setting this value to "express" is mandatory to use the express agent.
Allowed values:
inputstringRequired
The question you'd like to ask the agent
streamfalseRequired

Must be set to true when you want to stream the express agent response as its being generated, and false when you want the response to return after the agent has finished.

toolslist of objectsOptional

You can optionally ground the express agent response using results fetched from the web (max 1 web search)

Response

agentstring
The id of the agent populated in the request.
inputlist of objects
The users access role and question you asked the agent
outputlist of objects
The agent's response items

Errors

400
Express Agent Runs Request Bad Request Error
422
Express Agent Runs Request Unprocessable Entity Error