Cancel a response
Stop a response. A dropped stream cancels nothing; this call does.
The response comes back cancelled once nothing was left running, or in_progress while a step is still being torn down; a second cancel then also answers 200. A response that has already finished is response_finished, which includes one whose answer was complete when the cancel arrived: that one completes and is charged.
A response cancelled before its first text delta reached you is free; one cancelled after it is charged. The call accepts Idempotency-Key and stores nothing.
bearerAuthAuthorizationBearer <token>response_id*stringThe id of a response of this key.
uuidIdempotency-Key?stringMakes a retry safe. A repeat of the same request answers with the stored result and Idempotent-Replayed: true, and is never charged again; the same key on a different request is idempotency_key_reused. Without it, a retry is a new, charged request.
^[ -~]+$1 <= length <= 255The response after the cancel.
application/json- response
A response, in OpenAI's Responses shape plus depth, sources and usage.cost.
Fields OpenAI defines and this API does not use keep their defaults.
completed_at*|Unix seconds at which the response ended, whatever its status.
created_at*integerUnix seconds.
depth*|Echoed from the request; null for a response made before depth existed.
error*|nullid*stringuuidincomplete_details*|nullinstructions*string|nullmetadata*model*stringThe label the request named, echoed.
object*stringoutput*array<>Empty until the response is completed: there is no partial text.
parallel_tool_calls*booleanprevious_response_id*string|nullreasoning*sources*array<>What the answer cites, numbered by first citation. Empty until the response is completed.
status*string"queued""in_progress""completed""failed""cancelled"store*booleantemperature*numbertext*tool_choice*stringtools*array<>top_p*numbertruncation*string"auto""disabled"usage*|Present once the response has ended.
curl -X POST 'https://api.azta.ai/v1/responses/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel'{ "completed_at": 0, "created_at": 0, "depth": "standard", "error": { "code": "server_error", "message": "string" }, "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "incomplete_details": { "property1": "string", "property2": "string" }, "instructions": "string", "metadata": { "property1": "string", "property2": "string" }, "model": "string", "object": "response", "output": [ { "content": [ { "annotations": [ { "end_index": 0, "source_number": 1, "start_index": 0, "title": "string", "type": "url_citation", "url": "string" } ], "text": "string", "type": "output_text" } ], "id": "string", "role": "assistant", "status": "completed", "type": "message" } ], "parallel_tool_calls": true, "previous_response_id": "string", "reasoning": { "effort": "string", "summary": "string" }, "sources": [ { "act": { "identifier": "string", "short_title": "string", "title": "string" }, "country": "string", "excerpt": "string", "kind": "provision", "number": 1, "section": "string", "title": "string", "unit_id": "string", "url": "http://example.com", "url_kind": "official", "version": { "effective_from": "2019-08-24", "effective_to": "2019-08-24", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "is_current": true } } ], "status": "queued", "store": true, "temperature": 0, "text": { "format": { "type": "text" } }, "tool_choice": "string", "tools": [ {} ], "top_p": 0, "truncation": "auto", "usage": { "cost": { "amount": "string", "currency": "EUR" }, "input_tokens": 0, "input_tokens_details": { "cached_tokens": 0 }, "output_tokens": 0, "output_tokens_details": { "reasoning_tokens": 0 }, "total_tokens": 0 }}API reference
The Azta API, generated from the OpenAPI 3.1 document core publishes.
Create a response POST
Ask a question and get an answer from the law, with its sources. Set exactly one of `stream` and `background` to `true`. `stream` answers `200` with server-sent events; `background` answers `202` with the response at `status: queued`, which you poll with `getResponse` and which sends a webhook when it ends. This API is stateless: `input` is a string, or the whole conversation as items whose last item has the role `user`. `conversation` and `previous_response_id` are refused. Unknown fields are accepted and ignored. A response is charged to the organisation's credit balance (see `usage.cost`); a request the ledger refuses starts nothing.