v171

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-0726249111.7 MB
Deployments

Stream

Stream deployment generation. Only supported for completions and chat completions.

post/v2/deployments/stream

Request body

keystring required

The deployment key to invoke

inputsobject

Key-value pairs variables to replace in your prompts. If a variable is not provided that is defined in the prompt, the default variables are used.

contextobject

Key-value pairs that match your data model and fields declared in your deployment routing configuration

file_idsstring[]

A list of file IDs that are associated with the deployment request.

metadataobject

Key-value pairs that you want to attach to the log generated by this request.

extra_paramsobject

Utilized for passing additional parameters to the model provider. Exercise caution when using this feature, as the included parameters will overwrite any parameters specified in the deployment prompt configuration.

Example request

{
  "identity": {
    "id": "contact_01ARZ3NDEKTSV4RRFFQ69G5FAV",
    "display_name": "Jane Doe",
    "email": "jane.doe@example.com",
    "metadata": [
      {
        "department": "Engineering",
        "role": "Senior Developer"
      }
    ],
    "logo_url": "https://example.com/avatars/jane-doe.jpg",
    "tags": [
      "hr",
      "engineering"
    ]
  },
  "documents": [
    {
      "text": "The refund policy allows customers to return items within 30 days of purchase for a full refund.",
      "metadata": {
        "file_name": "refund_policy.pdf",
        "file_type": "application/pdf",
        "page_number": 1
      }
    },
    {
      "text": "Premium members receive free shipping on all orders over $50.",
      "metadata": {
        "file_name": "membership_benefits.md",
        "file_type": "text/markdown"
      }
    }
  ]
}

Response

Successful operation