agents/apiTHE ENCYCLOPEDIA
Core concepts

Files, outputs & published artifacts

Move input files into an environment and retrieve results before resource cleanup.

Input file
Environment workspace
Completed turn
Published artifact
Application storage

Files are working state

Files live in an environment. A session without an environment has no filesystem. For hosted compute, supply files in environment.files using a Files API file ID or inline base64 data and a workspace path. Check current upload limits in the official reference.

Artifacts are published outputs

For OpenAI-hosted compute, ask the agent to write deliverables under /workspace/outputs. Completed turns publish immutable artifacts. Match both turn ID and path when retrieving a result so an earlier version is not mistaken for the latest output.

Self-hosted file retrieval differs

Self-hosted files are retrieved through your provider or mounted filesystem, not the hosted Artifacts API. Copy results into application storage before shutting down or expiring the environment.

Retention and deletion

Published artifacts survive environment expiration, but save anything you need before deleting the session. Deleting an artifact does not remove the environment file. For several downloads, request each artifact or ask the agent to create a ZIP output.

Read the official reference

Check the source for current API fields, account requirements, and service limits.

OpenAI: files

23 matching topics

What is the OpenAI Agents API?FoundationsAgents API vs Agents SDK vs Responses APIComparisonsAgents API quickstartGetting startedSessions, turns & durable stateCore conceptsHosted vs self-hosted sandboxesInfrastructureConnect MCP servers to Agents APITools & integrationsFunction calling & application toolsTools & integrationsMulti-agent orchestrationCore conceptsStreaming, webhooks & event handlingIntegration guidesFiles, outputs & published artifactsCore conceptsVaults & MCP authenticationTools & integrationsAgent security & credential boundariesProductionTracing, usage & debuggingProductionAgents API pricing & cost planningProductionOpenAI Agents API with PythonGetting startedAgents API with TypeScript & Next.jsIntegration guidesWhat is the OpenAI Agents SDK?FoundationsResponses API in the agent stackFoundationsAgent Skills & SKILL.mdTools & integrationsProgrammatic Tool CallingTools & integrationsRAG, file search & vector storesTools & integrationsWeb search & source citationsTools & integrationsChatKit & Agent BuilderIntegration guides
K to open Esc to close