Daytona
Daytona runs AI-generated code in isolated sandboxes, each one behind an outbound firewall. Sandboxes with full internet access, meaning Tier 3 and Tier 4, reach the You.com APIs with no configuration at all. On Tier 1 and Tier 2, where organization network policy takes precedence over per-sandbox settings, You.com is listed on Daytona’s essential-services allow list. Bring your own API key.
API Hosts
Read this table before you configure anything. The You.com APIs are split across two hosts, and which one you hit decides what a firewall rule has to say.
Daytona’s essential-services entry covers you.com and *.you.com, so anything on api.you.com is reachable on every tier. ydc-index.io is a separate domain and needs its own allow-list entry. A sandbox that can reach one host but not the other fails in a confusing way: Research and Answer keep working while Web Search and Contents time out.
Confirm reachability from a Tier 1 or Tier 2 sandbox before you build on it. Organization network policy on those tiers cannot be overridden per sandbox, so a blocked host has no per-sandbox workaround. The verification step below returns the status code you need.
Getting Started
Install the SDKs
Set DAYTONA_API_KEY in the environment where your control script runs. Get a You.com API key at you.com/platform.
Store Your API Key as a Daytona Secret
Do not bake YDC_API_KEY into a snapshot or pass it as a plain sandbox environment variable. A Daytona Secret keeps the plaintext out of the sandbox: the sandbox gets an opaque placeholder, and Daytona’s outbound proxy swaps in the real key only for hosts you name.
hosts is the set of destinations the proxy will substitute the real value for, and it needs both entries. ydc-index.io covers the Web Search API and Contents API. api.you.com covers the Answer API, Research API, Finance Research API, and the MCP server. Drop either one and calls to that host go out carrying the placeholder instead of your key, which comes back as a 401.
Create a Sandbox and Verify the Path
Map the secret to the environment variable name the You.com SDKs already look for, then confirm the sandbox can actually reach the API before you build anything on top of it.
Both lines should print 200. The account balance endpoint is a free call, so it checks reachability and key substitution on api.you.com without spending credits. A 200 is the only proof that matters here: Daytona scrubs the real key out of responses, so an echo service will show you the placeholder whether substitution worked or not.
Daytona’s default command timeout is 10 seconds. Pass an explicit timeout for anything that installs packages or runs a research call.
Usage
Everything in this section runs inside the sandbox. The control script that creates the sandbox stays on your machine.
Python
TypeScript
cURL
MCP, no key
Search the live web, then pull the full text of the top result.
Upload it and run it:
How the Secret Reaches You.com
Daytona substitutes secrets in the outbound proxy rather than inside the sandbox, and the rules are narrow enough to be worth stating outright.
Custom Allow Lists
Daytona applies a default network policy based on your organization’s billing tier.
On a tier with full internet access, no configuration is needed. The moment you narrow a sandbox with domain_allow_list, though, you replace the permissive default with your own list, and both You.com hosts have to be on it. Use this value:
The list is comma-separated, domains only, with *. wildcards and a maximum of 20 entries. domainAllowList, networkAllowList, and networkBlockAll are mutually exclusive, and setting more than one non-empty value returns a 400.
you.com and *.you.com cover everything on api.you.com, which is the Answer API, Research API, Finance Research API, and the MCP server. They do not cover the Web Search API or the Contents API, both of which are served from ydc-index.io. Include both pairs unless you are certain the sandbox will never call Web Search or Contents.
Resources
Firewall tiers, allow-list parameters, and the essential-services list
Placeholder substitution, host allow lists, and substitution scope
Creating, configuring, and managing sandboxes
Running commands and code inside a sandbox
You.com Python SDK, reads the key from YDC_API_KEY
You.com TypeScript SDK for Node and edge runtimes
Remote MCP server at api.you.com, including the keyless free profile
Full Web Search API parameters and response schema