Skip to main content
Use this endpoint when you are building a custom provider adapter or integrating from a language without an SDK package. Start with Raw API integration for the end-to-end flow. If you are integrating OpenAI or Anthropic directly, use the provider SDK wrappers instead.

Endpoint

Authentication

The API key must have a policy attached.

Checkpoint Model

Every runtime decision uses the same endpoint and a different checkpoint_type.

Shared Body Fields

Request Checkpoint

Call request before sending user input to the model. Include normalized user payload and optional tools.
restrict_tools means the request may continue, but your adapter must remove the named tools before calling the provider.
Carry run_id into later tool_call checkpoints for this model run.

Media on Request

If your adapter supports images, send media separately from text.
Supported SDK media MIME types are image/jpeg, image/png, and image/webp.

Tool-call Checkpoint

Call tool_call after the model requests a tool and before your app executes it.
Allowed response:
If the decision is block, do not execute the tool.

Tool-result Checkpoint

Call tool_result after your app receives tool output and before sending that output back to the model.
Allowed response:
If the decision is block, do not send the tool output back to the model.

Output Checkpoint

Call output after the provider returns final text and before your app returns it to the user.
Rewrite response:
For rewrite, ask the provider for a safer answer, then call the output checkpoint again with rewrite_attempt: 1.

Response Fields

Adapter Rules

  • Do not call the provider when a request checkpoint returns block.
  • Remove blocked_tools before provider execution when a request checkpoint returns restrict_tools.
  • Do not execute a tool when a tool-call checkpoint returns block.
  • Do not send tool output back to the model when a tool-result checkpoint returns block.
  • Do not return final text to the user when an output checkpoint returns block.
  • For output rewrite, generate a rewritten answer and check it again with rewrite_attempt: 1.