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
LogoLogo
HomeSDKs & toolsAPI referencePricing
LogoLogo
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
Go to Platform
Custom solutionsAgents

Custom 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": "63773261-b4de-4d8f-9dfd-cff206a5cb51",
> "input": "What is the capital of France?",
> "stream": false
>}'
1{
2 "agent": "63773261-b4de-4d8f-9dfd-cff206a5cb51",
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}
## Description This endpoint lets you run an assistant you can configure within our web product at https://you.com/agents. The system supports both conversational inputs and advanced prompting techniques to define the agent’s behavior. <Info>The call only returns when the agent has finished fully responding to the input question.</Info> ## Enterprise Settings To maintain enterprise security, enable Zero Data Retention on your enterprise account. Manage this setting at [you.com/settings/privacy](https://you.com/settings/privacy). When enabled, we do not retain your data and do not use it for model training. <Warning>Privacy settings can only be managed by You.com Enterprise or team admins.</Warning>
Was this page helpful?
Built with

Description

This endpoint lets you run an assistant you can configure within our web product at https://you.com/agents. The system supports both conversational inputs and advanced prompting techniques to define the agent’s behavior.

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

Enterprise Settings

To maintain enterprise security, enable Zero Data Retention on your enterprise account. Manage this setting at you.com/settings/privacy. When enabled, we do not retain your data and do not use it for model training.

Privacy settings can only be managed by You.com Enterprise or team admins.

Authentication

AuthorizationBearer

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

Request

This endpoint expects an object.
agentstringRequired

Your Custom Agent’s ID. To obtain one you must have created a custom agent at https://you.com/agents.

inputstringRequired
The question you'd like to ask the agent
streamfalseRequired

Must be true to stream the agent response as it’s generated, and false to receive a response after the agent has finished.

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
Custom Agent Runs Request Bad Request Error
422
Custom Agent Runs Request Unprocessable Entity Error