ChatGPT · Arazzo Workflow

ChatGPT Structured JSON Output Response

Version 1.0.0

Generate a response constrained to a caller-supplied JSON schema.

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

Provider

chatgpt

Workflows

structured-output-response
Produce schema-constrained JSON from the Responses API and retrieve it.
Creates a response with a strict json_schema text format, polls it to completion, and retrieves the structured output text along with token usage.
3 steps inputs: apiKey, input, jsonSchema, model, schemaName outputs: finalStatus, responseId, structuredText, totalTokens
1
createStructured
createResponse
Create a stored response that constrains the output to the supplied JSON schema using strict formatting.
2
pollStructured
getResponse
Poll the response until it leaves the in_progress status.
3
retrieveStructured
getResponse
Retrieve the settled response and extract the structured JSON output text and token usage.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: ChatGPT Structured JSON Output Response
  summary: Generate a response constrained to a caller-supplied JSON schema.
  description: >-
    Uses the Responses API text.format configuration to force the model to
    return JSON that conforms to a caller-supplied schema. The response is
    created with strict json_schema formatting, then retrieved to extract the
    structured output text once generation settles. The flow branches when the
    response does not complete so callers can react to incomplete output. 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: structured-output-response
  summary: Produce schema-constrained JSON from the Responses API and retrieve it.
  description: >-
    Creates a response with a strict json_schema text format, polls it to
    completion, and retrieves the structured output text along with token
    usage.
  inputs:
    type: object
    required:
    - apiKey
    - model
    - input
    - schemaName
    - jsonSchema
    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 describing the data to extract or generate.
      schemaName:
        type: string
        description: The name of the JSON schema response format.
      jsonSchema:
        type: object
        description: The JSON schema the output must conform to.
  steps:
  - stepId: createStructured
    description: >-
      Create a stored response that constrains the output to the supplied JSON
      schema using strict formatting.
    operationId: createResponse
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiKey"
    requestBody:
      contentType: application/json
      payload:
        model: $inputs.model
        input: $inputs.input
        text:
          format:
            type: json_schema
            name: $inputs.schemaName
            schema: $inputs.jsonSchema
            strict: true
        store: true
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      responseId: $response.body#/id
      status: $response.body#/status
    onSuccess:
    - name: needsPolling
      type: goto
      stepId: pollStructured
      criteria:
      - context: $response.body
        condition: $.status == "in_progress"
        type: jsonpath
    - name: alreadyDone
      type: goto
      stepId: retrieveStructured
      criteria:
      - context: $response.body
        condition: $.status == "completed"
        type: jsonpath
  - stepId: pollStructured
    description: >-
      Poll the response until it leaves the in_progress status.
    operationId: getResponse
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiKey"
    - name: response_id
      in: path
      value: $steps.createStructured.outputs.responseId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
    onSuccess:
    - name: keepPolling
      type: goto
      stepId: pollStructured
      criteria:
      - context: $response.body
        condition: $.status == "in_progress"
        type: jsonpath
    - name: settled
      type: goto
      stepId: retrieveStructured
      criteria:
      - context: $response.body
        condition: $.status != "in_progress"
        type: jsonpath
  - stepId: retrieveStructured
    description: >-
      Retrieve the settled response and extract the structured JSON output
      text and token usage.
    operationId: getResponse
    parameters:
    - name: Authorization
      in: header
      value: "Bearer $inputs.apiKey"
    - name: response_id
      in: path
      value: $steps.createStructured.outputs.responseId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      finalStatus: $response.body#/status
      structuredText: $response.body#/output/0/content/0/text
      totalTokens: $response.body#/usage/total_tokens
  outputs:
    responseId: $steps.createStructured.outputs.responseId
    structuredText: $steps.retrieveStructured.outputs.structuredText
    finalStatus: $steps.retrieveStructured.outputs.finalStatus
    totalTokens: $steps.retrieveStructured.outputs.totalTokens

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-structured-output-response-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.