Skip to main content
Use this path for apps, SDKs, internal AI products, customer-facing AI features, and automation that calls model providers through HTTP APIs. Point the app to PasteGuard instead of the provider directly. PasteGuard masks PII and secrets, forwards the request, and restores supported placeholders in the response.

OpenAI SDK

from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:3000/openai/v1"
)

Anthropic SDK

from anthropic import Anthropic

client = Anthropic(
    base_url="http://localhost:3000/anthropic"
)

Self-Hosted App Examples

Self-hosted products such as Open WebUI and LibreChat can also use PasteGuard as their OpenAI-compatible endpoint.

Open WebUI and LibreChat

Example configuration for self-hosted chat products

LangChain

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    base_url="http://localhost:3000/openai/v1"
)

LlamaIndex

from llama_index.llms.openai_like import OpenAILike

llm = OpenAILike(
    api_base="http://localhost:3000/openai/v1",
    model="gpt-5.2",
    is_chat_model=True
)

When To Use This Path

Use this path when you are building or operating the app:
  • Internal support, legal, finance, or operations apps
  • Customer-facing AI features that may process user data
  • Self-hosted AI interfaces for teams
  • Regulated teams that need a local or self-hosted control point before requests reach a provider