Stateless responses API
Requires the RESPONSES scope. Stateless by design. Streaming defaults to off; explicit stream: true enables progressive SSE using the distinct OpenAI Responses event protocol, not Chat/Completions chunks or their [DONE] terminator. The API forwards emitted deltas without buffering the entire output; a provider backend may buffer its own output rather than emit token by token. Native Core durable jobs preserve billing and reconciliation. Disconnecting does not guarantee cancellation or a refund; charges settle exactly from the signed receipt for work performed. Budget with max_tokens. stream_recovery_unavailable means the gateway does not yet support stream recovery: the request fails before inference starts; use stream: false instead.
Request
- Base URL: https://api.openmayhem.ai/v1
- URL: https://api.openmayhem.ai/v1/responses
- Auth: HTTP bearer
Headers
Minimum acceptable provider attestation tier. Unlike the catalog's exact attestation_tier filter, dispatch accepts this tier or any higher tier.
Text generation only. Minimum provider context capacity in tokens. The effective floor is never lower than the request's calculated input plus output requirement.
Require one canonical quantization bucket; matching is case-insensitive after normalization.
Ordered, comma-separated provider public keys. This is a strict provider set: failover follows the listed order and does not fall back outside the set.
Text generation only. Set to 1 to request hedged dispatch across eligible routes, or 0 to disable it. It cannot be combined with X-Mayhem-Prefer-Providers.
Minimum sustained throughput in the endpoint's native measured unit per second. For text this is tokens per second; other endpoint families use their Core-defined native unit.
Maximum time in milliseconds to wait for an eligible provider admission. This is not the inference or asynchronous job runtime limit.
Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.
Maximum retail USD hold for this request, with at most 6 decimal places. The request is rejected before spend if its worst case is higher. The stricter of this value and the API key's per-request cap wins. This never controls the private wholesale X-Mayhem-Max-Price-Au limit.
Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.
Price ceiling for the model of this request. The request is refused before any credit hold with 403 price_ceiling_exceeded when the model's retail input price per one million tokens (pricing.prompt_per_million_au) is higher. The catalog filter max_input_price_per_million_usd takes the same number. It has no effect on a model without an input token rate.
Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.
Price ceiling for the model of this request. The request is refused before any credit hold with 403 price_ceiling_exceeded when the model's retail output price per one million tokens (pricing.completion_per_million_au) is higher. The catalog filter max_output_price_per_million_usd takes the same number. It has no effect on a model without an output token rate.
Non-negative decimal USD string with at most 6 decimal places, parsed with exact fixed-point arithmetic.
Price ceiling for the model of this request. The request is refused before any credit hold with 403 price_ceiling_exceeded when the retail price of the model's representative request (pricing.representative_request_au) is higher. The catalog filter max_representative_request_price_usd takes the same number. Use it for media, audio, video and workflow models.
An estimate_id from POST /estimates. When present, it must match this key, model, body and routing controls; execution refuses a higher live maximum before holding credit.
Request body
Response
With streaming off, a Responses-shaped result with usage.cost and openmayhem fields. With stream: true, text/event-stream carrying Responses events with x-openmayhem-stream-mode: live.
Changes
No recorded changes to this operation across all 1 revision of this API.