ChatGPT · Arazzo Workflow

ChatGPT Response Lifecycle With Cleanup

Version 1.0.0

Create a stored response, read its output, then delete it.

1 workflow 1 source API 1 provider
View Spec View on GitHub AgentsArtificial IntelligenceChatGPTEmbeddingsFine-TuningGPT-4GPT-5Language ModelOpenAIReal-TimeArazzoWorkflows

Provider

chatgpt

Workflows

response-lifecycle-cleanup
Create, read, and delete a single stored Responses API response.
Creates a stored response, retrieves its generated text and usage, then deletes the stored response and confirms the deletion flag.
3 steps inputs: apiKey, input, model outputs: deleted, outputText, responseId, totalTokens
1
createResponse
createResponse
Create the stored response so it can be retrieved and later deleted.
2
readResponse
getResponse
Retrieve the stored response by id to capture the generated text and token usage before deleting it.
3
deleteResponse
deleteResponse
Delete the stored response so it no longer persists on the account, and confirm the deletion flag in the body.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: ChatGPT Response Lifecycle With Cleanup
  summary: Create a stored response, read its output, then delete it.
  description: >-
    Exercises the full stored-response lifecycle of the Responses API. A
    response is created and stored, its generated output is read back by id,
    and the stored response is then deleted so it no longer persists on the
    account. This is the canonical pattern for one-shot generations that must
    not leave retained data behind. Every step spells out its request inline so
    the flow can be read and executed without opening the underlying OpenAPI
    description.
  version: 1.0.0
  x-realizes-capability-ids:
  - BC-610.60
  x-capability-derivation:
    method: 'deterministic join: sourceDescriptions -> per-tag OpenAPI -> tag/capability edge. No classification at this step.'
    min_confidence: 0.7
    sources:
    - capability_id: BC-610.60
      capability_name: Artificial Intelligence Management
      spec: chatgpt-responses-api-openapi.yml
      confidence: 0.7
    model: Turbo EA Capabilities by Vincent Verdet — Turbo EA, https://github.com/vincentmakes/turbo-ea-capabilities, CC BY 4.0
sourceDescriptions:
- name: responsesApi
  url: ../openapi/chatgpt-responses-api-openapi.yml
  type: openapi
workflows:
- workflowId: response-lifecycle-cleanup
  summary: Create, read, and delete a single stored Responses API response.
  description: >-
    Creates a stored response, retrieves its generated text and usage, then
    deletes the stored response and confirms the deletion flag.
  inputs:
    type: object
    required:
    - apiKey
    - model
    - input
    properties:
      apiKey:
        type: string
        description: OpenAI API key used as the Bearer credential.
      model:
        type: string
        description: Model ID used to generate the response (e.g. gpt-4o).
      input:
        type: string
        description: The prompt to send to the model.
  steps:
  - stepId: createResponse
    description: >-
      Create the stored response so it can be retrieved and later deleted.
    operationId: createResponse
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiKey"
    requestBody:
      contentType: application/json
      payload:
        model: $inputs.model
        input: $inputs.input
        store: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      responseId: $response.body#/id
      status: $response.body#/status
  - stepId: readResponse
    description: >-
      Retrieve the stored response by id to capture the generated text and
      token usage before deleting it.
    operationId: getResponse
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiKey"
    - name: response_id
      in: path
      value: $steps.createResponse.outputs.responseId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      outputText: $response.body#/output/0/content/0/text
      totalTokens: $response.body#/usage/total_tokens
  - stepId: deleteResponse
    description: >-
      Delete the stored response so it no longer persists on the account, and
      confirm the deletion flag in the body.
    operationId: deleteResponse
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiKey"
    - name: response_id
      in: path
      value: $steps.createResponse.outputs.responseId
    successCriteria:
    - condition: $statusCode == 200
    - context: $response.body
      condition: $.deleted == true
      type: jsonpath
    outputs:
      deletedId: $response.body#/id
      deleted: $response.body#/deleted
  outputs:
    responseId: $steps.createResponse.outputs.responseId
    outputText: $steps.readResponse.outputs.outputText
    totalTokens: $steps.readResponse.outputs.totalTokens
    deleted: $steps.deleteResponse.outputs.deleted

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/chatgpt-response-lifecycle-cleanup-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.