apicheats.dev Cheat sheet Raw .md
POST

Try POST /agents/sessions — OpenAI API

OpenAI playground

Create an agent session

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.openai.com; the proxy stores and logs nothing about them.

Body application/json

7 body fields
  • metadata · optional · object — Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters. Omission or null defaults to an empty map.
  • agent · optional · object — Agent configuration for a session. Omitted fields inherit from `agent_id` when supplied. Supplied objects and arrays replace the whole field; null resets nullable fields.
  • agent_id · optional · string — The ID of a saved reusable agent. Omit `agent` to use its configuration unchanged.
  • environment · required · object — The execution environment and optional reusable template for a session.
  • vault_ids · optional · string[] — The IDs of vaults made available to the session.
  • input · optional · string — Initial input to submit when the session is created. A string is shorthand for a single user message. Required when `environment.type` is `none`, or when `stream` is `true` for an environment that is not `self_hosted`; optional for self-hosted and non-streaming execution environments.
  • stream · optional · boolean — Whether to stream session events as server-sent events. Defaults to `false`.