Structured Outputs

Run Structured Output

Changed on
post/structured-output/run

Request

  • Base URL
    https://api.vapi.ai
  • Auth
    HTTP bearer

Request body

previewEnabledboolean

This is the preview flag for the re-run. If true, the re-run will be executed and the response will be returned immediately and the call artifact will NOT be updated. If false (default), the re-run will be executed and the response will be updated in the call artifact.

structuredOutputIdstring

This is the ID of the structured output that will be run. This must be provided unless a transient structured output is provided. When the re-run is executed, only the value of this structured output will be replaced with the new value, or added if not present.

callIdsstring[] required

This is the array of callIds that will be updated with the new structured output value. If preview is true, this array must be provided and contain exactly 1 callId. If preview is false, up to 100 callIds may be provided.

Example request

{
  "structuredOutput": {
    "conditions": [
      {
        "type": "minMessages",
        "count": 4
      },
      {
        "type": "minCallDuration",
        "seconds": 10
      }
    ]
  }
}

Response

OR

Changes

    • info

      added the new optional request property ///////

    • info

      added the new gpt-6-luna enum value to the request property ///////

Some revisions have not been checked yet.