API reference

API reference · Agents

Delete an agent

DELETE/v1/agents/{id}API key

Its keys stop at once and what it can spend returns to the account; money held by a request in flight follows when that request settles. Its ledger rows stay.

Parameters

Path and query parameters
FieldTypeWhat it is
id (path)requiredstringThe agent's id; self on an agent's own key where the route allows it.

Answer 200

Deleted.

Fields of the 200 answer
FieldTypeWhat it is
idinteger
objectstringOne of "agent.deleted".
deletedboolean
returned_microsintegerMoved back to the account now.
still_held_microsintegerHeld by requests in flight; returned once they settle.

Errors

  • 401OpenAI shaped error.
  • 403OpenAI shaped error.
  • 404OpenAI shaped error.

Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.

Antimatter