Kimi DLP Needs a Decision Before the Inference Request Leaves
Kimi exposes OpenAI-compatible and Anthropic-compatible HTTP inference APIs secured with Bearer credentials. A Kimi DLP control should classify the assembled prompt, apply identity-aware policy, and allow, redact, or block the request before it reaches api.moonshot.ai. Kimi request details can later correlate a forwarded call through a client-supplied request ID, but provider telemetry and zero data retention serve different control purposes.

Kimi's current quickstart sends a JSON prompt to https://api.moonshot.ai/v1 under Bearer authentication. It supports OpenAI-compatible and Anthropic-compatible formats. The documentation now leads with Kimi K3.1 Pro. That provider-bound HTTP request is the Kimi DLP enforcement point.
The decision has to happen before transmission. Kimi's later request record can confirm which project and credential handled a forwarded call, as well as the model used. The record cannot retroactively remove a customer identifier that policy should have blocked or redacted.
TL;DR
- Kimi DLP belongs on the Bearer-authenticated HTTP inference request before prompt content reaches
api.moonshot.ai. - Policy needs the originating user or agent and the assembled prompt classification. It also needs the destination model and active rule version.
- Send
X-Msh-Client-Request-Idso an allowed or redacted call can be matched to Kimi's laterclient_request_idrecord. - Kimi Code, files, tools, organization administration, provider retention, and direct bypass traffic retain separate control owners.
The Kimi API exposes a clear enforcement point
The Kimi API quickstart documents direct HTTP access and SDK access through OpenAI-compatible and Anthropic-compatible interfaces. Its current example calls https://api.moonshot.ai/v1/chat/completions, uses HTTP Bearer authentication, and sends a messages array containing system and user content. The page recommends Kimi K3.1 Pro for a first call.
That request can carry more than the text visible in a chat box. An application may assemble system instructions and retrieved customer records alongside prior conversation turns and user input. Classification belongs on the final assembled content. A folder label applied earlier cannot account for a customer number copied into a system message or a sensitive passage inserted by retrieval.
Picture the useful inspection view. A JSON messages array sits on the left, with three highlighted sensitive spans in the center. The authenticated employee and model route appear on the right beside the policy version. The AI gateway architecture guide describes this policy point on the routed model request.
Bearer authentication leaves an identity question
The Kimi API credential authenticates the calling workload to Moonshot AI. One backend credential may still serve 300 employees or several agents across multiple customer tenants. Kimi can identify the credential and project accurately. Only the calling application knows which human or agent initiated one request.
A useful DLP decision therefore binds four inputs at the same point:
- Originating principal: the authenticated person or service. This includes a delegated agent supplied by the application.
- Content classification: the data classes and matched spans found in the assembled inference payload.
- Destination context: the Kimi endpoint and selected model, with the application purpose and approved route.
- Policy state: the rule version and action, plus the exception reference, correlation identifier, and timestamp.
Policy can allow or stop the request. An allow decision may redact only the matched value before forwarding. The AI policy enforcement guide explains why identity and destination context change the decision even when two prompts contain the same data class.
I would reject any Kimi DLP design that records only the Bearer credential. A workload identity is useful evidence, but it is a poor substitute for the employee or agent whose action triggered the call.
A client request ID connects the two records
Kimi's request-details documentation tells inference callers to send X-Msh-Client-Request-Id. Kimi persists the supplied value as client_request_id in its request-details feed. This gives the customer-side policy record and provider-side usage row an exact join value instead of a guess based on timestamps and token counts.
The provider row identifies one request. It names the model, project, and inference credential. Separate fields contain prompt, completion, and cached-token counts, plus the client request ID. Data for day T becomes available at 07:00 UTC+8 on day T+1. Kimi documents 90-day retention for request details and limits a query to 31 days.
Those fields answer whether a forwarded request reached Kimi and how the platform recorded its usage. The independent DLP record answers which principal initiated it and what data classes were found. It also records which rule ran. If content changed before transmission, the record preserves that fact. The existing Kimi audit logs guide maps provider administration and request details alongside credentials, retention, and zero data retention.
Two controlled requests prove the boundary
Use synthetic data and a named test identity. Send one prompt through the approved proxy under a role permitted to use the chosen Kimi model after a specific value is redacted. Then send a second prompt containing the same labeled value under a role that policy denies. Both attempts should carry customer correlation identifiers. Only the forwarded request receives a matching Kimi request-details row.
The first evidence packet should show the original classification result and redaction action. It should also show the resulting destination and policy version. Include the X-Msh-Client-Request-Id. After Kimi's next-day availability point, match that identifier to client_request_id and confirm the project and credential, then confirm the model and token fields as well. For the blocked request, preserve the policy decision and verify the absence of a provider call.
Run the same test after changing the model or application identity integration. Repeat it after changing the route or policy version. The LLM DLP and traditional DLP guide assigns endpoint and storage controls to their proper surfaces, along with email and AI request controls.
Zero data retention serves a different purpose
Kimi's zero data retention documentation says enterprise customers can request a mode that deletes prompts and model responses after the response is returned. The platform says enterprise customer data is excluded from model training by default. ZDR changes content retention while the API and its parameters remain in place, along with billing and automated safeguards.
Batch jobs lack ZDR support. Direct image and video uploads through the File Upload API lack a ZDR guarantee. Operational data such as security logs and billing records sits outside ZDR. Data handled by third-party models also sits outside ZDR, as does data handled by their connectors and plugins. Kimi tells customers to keep their own request logs because it cannot trace individual request content after deletion.
ZDR reduces provider-side content retention under the approved enterprise arrangement. Kimi DLP decides whether specific content may be transmitted in the first place. The LLM audit-log retention guide covers why provider windows and enterprise evidence periods need separate records.
The boundary excludes local execution and bypass traffic
This control covers authenticated Kimi inference requests deliberately sent through the configured HTTP proxy. Kimi Code local execution and files remain with endpoint and application controls. The same applies to shell activity, tools, and credential custody, with secret management covering the credential. Organization administration and provider retention remain with Moonshot AI and the customer's platform team.
A direct request sent around the proxy is invisible to its policy decision. Network egress must restrict Kimi API access to the approved route. Release testing should prove that a workload cannot call api.moonshot.ai directly. The route record should name the identity source and the permitted Kimi endpoints and models. It should also name the expected data classes and policy owner. Name the separate egress owner too.
DeepInspect
DeepInspect sits on the approved HTTP path between an authenticated user or agent and the Kimi inference API. The calling application supplies identity context. DeepInspect classifies the assembled prompt and evaluates per-role and per-route policy before forwarding. It can allow or block the call. An approved rule can redact matched content first.
Each decision records the principal and data class. It also records the destination and policy version, plus the outcome and correlation identifier. A forwarded call can carry the same identifier in X-Msh-Client-Request-Id, allowing later reconciliation with Kimi's client_request_id. Kimi Code, files, and tools remain with their existing owners. So do organization administration, provider retention, and bypass prevention.
Book a technical deep dive at deepinspect.ai.
Frequently asked questions
- Where should Kimi DLP run?
It should run on the final assembled HTTP inference request after the application adds its instructions and context, but before the request reaches
api.moonshot.ai. This placement allows one decision to evaluate the actual prompt and originating principal together with the Kimi model route and current policy.- Does a Kimi API key identify the employee using the model?
The Bearer credential identifies the API caller. A backend shared by several employees or agents must preserve the originating principal separately and bind that identity to the routed request record. Policy should record missing identity context rather than infer a named person.
- Can Kimi request details replace a DLP decision?
Request details support provider-side correlation after a call. They identify the model and project alongside the credential, token counts, and client request ID. A pre-send DLP record preserves the prompt classification and principal. It also preserves the rule version and action. Any redaction before provider transmission remains in that record as well.
- Does Kimi ZDR remove the need for DLP?
ZDR controls provider-side retention after processing. Pre-send policy controls transmission. Kimi also excludes operational logs and billing records from the documented ZDR scope. Batch API jobs, some direct uploads, and third-party services are excluded as well.
- What remains outside this Kimi DLP boundary?
Kimi Code execution, local files, shell commands, tools, API-key custody, organization administration, and provider retention have separate owners. Direct calls that bypass the approved proxy need an egress control because the routed policy point cannot inspect them.