@anthropic-ai/sdk code and everything works. Requires the ai:chat scope.
Migrating from Anthropic
Request
Streaming events
Whenstream: true, the event stream uses Anthropic’s exact wire format:
Compliance behavior
All HASP compliance checks apply — PHI Guard, BAA enforcement, credit metering — regardless of which endpoint you use. Compliance is a property of your organization, not the endpoint shape.- PHI Guard runs on all messages. If
phi_mode=redact(default), PHI is replaced with placeholders before the upstream call. Ifphi_mode=block, the request returns403 PHI_BLOCKEDusing the HASP error envelope. - BAA required. No active BAA →
402 BAA_REQUIREDon every request. - Credit metering. Credits are deducted after each successful response. Exhausted credits →
402 AI_CREDITS_EXHAUSTED.
Native-only flags are rejected
Parameters that exist in the native/v1/ai/chat endpoint but not in Anthropic’s wire format are rejected with 400 UNSUPPORTED_PARAMETER rather than silently accepted:
store— usePOST /v1/ai/chatif you need stateless (no-content-storage) requests.- Any other non-Anthropic field.
store: false and get a 200 back, you might wrongly assume the content wasn’t stored.
Graduating to native features
Customers using/v1/messages can migrate endpoint-by-endpoint to /v1/ai/chat to gain:
store: falsefor stateless requests- PHI entity metadata in responses
- Run and conversation management