Skip to main content
Prism exposes a stateless OpenAI Responses-compatible endpoint. Use it with OpenAI SDK clients that call client.responses.create().

Create a response

Assistant text is available in output_text and in the output message item. Function calls are returned as function_call output items. Free-form custom tool calls are returned as custom_tool_call output items.

Body parameters

Reasoning is on by default and appears as a reasoning output item before the message. Send reasoning: { "effort": "none" } to skip it and receive answer text as the first output. See Chat Completions reasoning for the effort levels.

Image input

For prism/deepseek-v4.1-flash, include an input_image part in a user message. image_url accepts a base64 data URL:
JPEG, PNG, GIF, and WebP are supported. Remote URLs and OpenAI file IDs are not accepted, so send image bytes through image_url. prism/deepseek-v4-flash is text-only, and the complete request must fit within the 4 MiB request limit.

Continue a tool loop

Return prior output items explicitly in the next request:

Use a custom tool

Custom tools accept free-form string input instead of JSON arguments. Prism supports unconstrained text and lark or regex grammar declarations:
Prism presents the custom tool to the provider as a function with one string field named input. Provider calls are converted back to custom_tool_call items:
Return the result in the next request as a custom_tool_call_output item with the same call_id. Keep the tool declaration in each stateless request.
Grammar definitions are included as model instructions but are not enforced during provider decoding. Validate custom-tool input before executing it.

Use namespace tools

Namespaces group related function or custom tools:
Prism flattens each namespace member into a provider function. Returned function_call items restore the member name and include its namespace:
Round-trip the namespace field with the function call in later requests.

Stream a response

Streams use typed Responses events, including response.created, response.output_item.added, response.output_text.delta, response.output_item.done, and response.completed.

Stateless compatibility

Prism applies zero data retention and does not implement stored Responses resources. Keep the conversation in your application and resend the required input items on each request. Prism accepts client_metadata, service_tier, and Codex reasoning stream options for client compatibility. These fields do not change provider routing or decoding behavior. The following OpenAI features are not supported:
  • previous_response_id
  • store: true
  • background: true
  • other Responses tool types such as web search, file search, computer use, shell, local shell, and native apply patch
  • response retrieval, cancellation, deletion, and input-item subresources
Unsupported fields return an OpenAI-compatible 400 error rather than being silently ignored.
Last modified on September 13, 2026