Skip to main content
Developers

API Documentation

One redaction layer across supported AI provider APIs.

Data handling guarantee

RedactCloud never stores prompt content, tool payloads, response payloads, or upstream provider API keys. Requests are processed transiently in memory. Payload-free usage records contain only a request identifier, provider/protocol/status fields, byte and entity counts, and latency.

Quick Start

The fastest setup is available after sign-in: open Quick start on the dashboard, choose a provider, create your RedactCloud key, test the provider connection, and copy ready-to-run Python, Node.js, or cURL code.

  1. Open the dashboard and create your RedactCloud API key.
  2. Select your provider. OpenRouter is the recommended starting point when you need access to multiple model families.
  3. Use your provider key for the one-time connection test. It is processed in memory, cleared from the form after the test, and not persisted.
  4. Copy application code, or generate a one-command Codex or Claude Code connection.

Codex and Claude Code

The dashboard creates a client-held gateway token for each coding-agent connection. It contains the provider credential in authenticated encryption, is not stored by RedactCloud, expires after at most 90 days, and can be disconnected individually from Coding Agents. Revoking its linked RedactCloud API key also invalidates every connection that uses that key.

  1. Open Quick start and scroll to Connect a coding agent.
  2. Choose Codex or Claude Code, then select a compatible provider.
  3. Enter the provider API key and select Generate command.
  4. Copy the command and run it in the project terminal.

Codex supports OpenAI and OpenRouter through the Responses API. Claude Code supports Anthropic and OpenRouter through native Messages, content blocks, tool use, token counting, and SSE event streams. OpenRouter is recommended when one coding-agent connection should access a broader model catalog.

Provider base URLs

You only need these URLs when configuring the integration manually.

OpenAI:      https://redactcloud.com/api/v1
Gemini:     https://redactcloud.com/api/v1/gemini
DeepSeek:   https://redactcloud.com/api/v1/deepseek
OpenRouter: https://redactcloud.com/api/v1/openrouter
Groq:       https://redactcloud.com/api/v1/groq
Mistral:    https://redactcloud.com/api/v1/mistral
xAI:        https://redactcloud.com/api/v1/xai
Together:   https://redactcloud.com/api/v1/together
Fireworks:  https://redactcloud.com/api/v1/fireworks
Perplexity: https://redactcloud.com/api/v1/perplexity
Anthropic:  https://redactcloud.com/api/anthropic

VS Code, Cursor, and Antigravity extension

The same preview extension works in VS Code-compatible editors. It redacts selected text locally before you paste it into a built-in AI chat, so the original selection never leaves the editor extension host.

Download the RedactCloud extension preview (.vsix)

  1. Open the Extensions view and choose Install from VSIX... from its actions menu.
  2. Select text that may contain PII or secrets.
  3. Right-click and choose RedactCloud: Copy Redacted Selection.
  4. Paste the protected result into the AI chat.

The extension makes no network requests and sends no telemetry. It does not claim to intercept private built-in chat traffic. For transparent Codex, Claude Code, SDK, or API traffic, use the gateway connection above.

Authentication

There are two separate credentials. Send the RedactCloud key in Authorization or X-API-Key; it identifies your gateway account. Send the selected AI provider key in X-Upstream-Key; it authorizes only the upstream model request. Provider keys are not persisted.

Authorization: Bearer rc_live_your_api_key_here
X-Upstream-Key: your-provider-api-key

Endpoints

OpenAI Responses

  • POST /api/v1/responses — OpenAI default route
  • POST /api/v1/openai/responses — OpenAI explicit route
  • POST /api/v1/openrouter/responses — OpenRouter multi-model route

Responses endpoints pass through structured input, reasoning settings, function tools, tool results, and SSE events while redacting protected text fields.

OpenAI-compatible Chat Completions

  • POST /api/v1/chat/completions — OpenAI
  • POST /api/v1/gemini/chat/completions — Gemini OpenAI compatibility API
  • POST /api/v1/deepseek/chat/completions — DeepSeek
  • POST /api/v1/openrouter/chat/completions — OpenRouter, including Claude and other routed models
  • POST /api/v1/groq/chat/completions — Groq
  • POST /api/v1/mistral/chat/completions — Mistral
  • POST /api/v1/xai/chat/completions — xAI / Grok
  • POST /api/v1/together/chat/completions — Together AI
  • POST /api/v1/fireworks/chat/completions — Fireworks AI
  • POST /api/v1/perplexity/chat/completions — Perplexity Sonar

These routes support text messages and content blocks, developer, system, user, assistant, and tool roles, tool calls and results, structured response settings, and SSE responses.

Example Request

curl -X POST https://redactcloud.com/api/v1/openrouter/chat/completions \
  -H "Authorization: Bearer rc_live_your_key" \
  -H "X-Upstream-Key: sk-or-your-openrouter-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-4",
    "messages": [
      {"role": "user", "content": "My SSN is 123-45-6789"}
    ]
  }'

Example Response

The response preserves the selected OpenAI-compatible Chat Completions response shape. Redaction placeholders echoed by the model are restored before the response is returned.

Anthropic Messages

POST /api/anthropic/v1/messages and POST /api/openrouter/v1/messages support native string or content-block messages, tool use, thinking settings, and SSE events. Matching /v1/messages/count_tokens routes are available for both providers. Send the provider key in X-Upstream-Key. When a client already sends the RedactCloud key as a bearer token, native X-Api-Key is also accepted as the upstream Anthropic credential.

curl -X POST https://redactcloud.com/api/anthropic/v1/messages \
  -H "Authorization: Bearer rc_live_your_key" \
  -H "X-Upstream-Key: sk-ant-your-key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 512,
    "messages": [
      {"role": "user", "content": "My SSN is 123-45-6789"}
    ]
  }'

Compatibility

  • Direct providers — OpenAI, Anthropic, Gemini, DeepSeek, OpenRouter, Groq, Mistral, xAI, Together, Fireworks, and Perplexity.
  • Codex — supported with OpenAI or OpenRouter Responses API connections generated by the dashboard.
  • Claude Code — supported with Anthropic or OpenRouter native Messages connections generated by the dashboard.
  • VS Code-compatible editors — the local selection-redaction extension supports VS Code, Cursor, and Antigravity without intercepting their built-in AI chats.
  • Streaming — SSE protocol responses are supported on Chat Completions, Responses, and native Messages routes.
  • Other agent protocols — provider-specific coding clients still require separate protocol verification before transparent gateway support is listed.
  • Cloud-specific APIs — Azure OpenAI, Amazon Bedrock, and Vertex AI need tenant endpoints or signed authentication and are not exposed through the shared BYOK route.

Safe input boundary

RedactCloud currently accepts text and structured tool data. Image, audio, document, and file inputs are rejected before forwarding because their contents cannot yet be inspected with the same privacy guarantees.

Errors and support

Every API response includes an X-Request-ID. Include it when contacting support; RedactCloud stores it with payload-free provider, protocol, status, byte/entity count, and latency telemetry.

  • 401 — RedactCloud key, coding-agent connection, or provider credential was rejected.
  • 422 — request shape, model, or input type is unsupported; inspect error.details.
  • 429 — RedactCloud or upstream provider rate/quota limit was reached.
  • 502 or 503 — the upstream provider returned an invalid response or was unavailable.

Claude Code must use the complete generated command, including its custom authentication headers. Generating the same agent/provider connection again invalidates its previous token.

Rate Limits

Each account has a monthly protected-request quota and a per-key rate limit. Usage is returned in X-RedactCloud-* and X-RateLimit-* response headers. A protected request counts after prompt content is scanned and payload-free usage metadata is recorded, including upstream failures. Model-list lookups and requests rejected before scanning do not consume quota. Free pauses at its monthly limit; Pro has 10% temporary grace before exceeded limits return 429 Too Many Requests.

Redacted Entities

The following entity types are automatically detected and redacted:

  • Social Security Numbers (SSN)
  • Credit Card Numbers
  • Email Addresses
  • IP Addresses
  • JWT Tokens
  • AWS Access Keys
  • OpenAI, Anthropic, and Google API Keys
  • US Phone Numbers
  • US ZIP Codes

Compliance

RedactCloud is designed to support privacy and security programs. You remain responsible for validating your deployment and upstream data-retention settings. Read the security overview.