Custom Agent

Beta
View as MarkdownOpen in Claude
<Warning>Access to this endpoint requires a paid subscription plan</Warning> ## Description This endpoint lets you run an assistant you can configure in the UI. Users can create a custom AI agent by providing a description of the desired functionality using natural language. The system supports both conversational inputs and advanced prompting techniques to define the agent's behavior. Before using it you must have created a custom agent at https://you.com/agents. ## 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> The data returns as SSE (Server-Side Events) with the `text/event-stream` content type in the response header. It streams data in while the agent is responding.

Authentication

AuthorizationBearer

A unique API Key is required to authorize API access. For details, see how to get your API Key.

Request

The parameters we pass to ask the agent a question
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
streamtrueRequired

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

Response

<Warning>Access to this endpoint requires a paid subscription plan</Warning> ## Description This endpoint lets you run an assistant you can configure in the UI. Users can create a custom AI agent by providing a description of the desired functionality using natural language. The system supports both conversational inputs and advanced prompting techniques to define the agent's behavior. Before using it you must have created a custom agent at https://you.com/agents. ## 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> The data returns as SSE (Server-Side Events) with the `text/event-stream` content type in the response header. It streams data in while the agent is responding.
response.createdobject
SSE event signifying the response stream has been created
OR
response.startingobject
SSE event signifying the response is starting
OR
response.output_item.addedobject
SSE event signifying an output item has been added
OR
response.output_content.fullobject
OR
response.output_item.doneobject
OR
response.output_text.deltaobject
OR
response.doneobject

Errors

400
Bad Request Error
422
Unprocessable Entity Error