apicheats.dev openai/llms.txt Raw .md
POST

POST /agents/{agent_id} — OpenAI API

OpenAI API key (required); https://api.openai.com/v1

OpenAI API

Update an agent

Base URL
https://api.openai.com/v1
Auth
Authorization: Bearer <OPENAI_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 361 tokens · Vary: Accept

Critical gotchas

The Responses API is the primary interface for new text and tool workflows; Chat Completions remains a separate compatibility API.

Audio transcription uploads use multipart form data rather than a JSON request body.

cURL

curl -X POST 'https://api.openai.com/v1/agents/agent-id' \  -H "Authorization: Bearer $OPENAI_API_KEY" \  -H 'Content-Type: application/json' \  -d '{}'

Parameters

Name In Type Required Description
agent_id path string Yes The ID of the reusable agent.
model body string No The model to use for the agent. The requested model name is preserved.
reasoning body object No Configuration for model reasoning. Omit to keep the current settings; pass `null` to reset to the model's default effort.
text body object No Configuration for text generated by the agent.
service_tier body string No The service tier used for model requests.
instructions body string No Additional instructions appended to the agent's default base instructions. Omit to leave unchanged.
multi_agent body object No Configuration for creating and coordinating subagents.
metadata body object No Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear it. Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters.
name body string No A replacement name. Omit to leave unchanged, or pass null to clear it.
tools body object[] No Replaces the tool list. Omit to leave it unchanged, or pass null to clear it. The replacement must fit within 3 MiB (3,145,728 bytes) of compact UTF-8 JSON.

Response 200 OK

{
  "id": "string",
  "object": "agent",
  "created_at": 0,
  "updated_at": 0,
  "name": "string",
  "metadata": {},
  "model": "string",
  "reasoning": {
    "effort": "none",
    "summary": "concise"
  },
  "text": {
    "format": {
      "type": "text"
    },
    "verbosity": "low"
  },
  "service_tier": "auto",
  "instructions": "string",
  "tools": [
    {
      "type": "function",
      "name": "string",
      "description": "string",
      "parameters": {},
      "defer_loading": true
    }
  ],
  "multi_agent": {
    "enabled": true,
    "max_concurrent_subagents": 0
  }
}
Get a free OpenAI API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.