> ## Documentation Index
> Fetch the complete documentation index at: https://docs.promptguard.co/llms.txt
> Use this file to discover all available pages before exploring further.

# SDKs

> The Python and Node.js SDKs: where to start, how-to guides, the generated reference, the 2.0 upgrade guide and troubleshooting

PromptGuard has two SDKs, for Python and for Node.js. Both do the same two
things: `init()` patches the LLM provider SDKs you already use so every call is
scanned before it is sent ([auto-instrumentation](https://docs.promptguard.co/integrations/auto-instrumentation.md)),
and a Guard client calls the [Guard API](https://docs.promptguard.co/api-reference/guard.md) directly when you
want to scan text yourself. Both are open source on GitHub.

## Get started

> [card] [Quickstart](https://docs.promptguard.co/quickstart.md)
>
> Get an API key, install the SDK and see a request blocked, in about five
> minutes.

## How-to guides

> [card] [Python SDK](https://docs.promptguard.co/guides/python-sdk.md)
>
> Install, initialise, the Guard client, error handling and retries.

> [card] [Node.js SDK](https://docs.promptguard.co/guides/node-sdk.md)
>
> The same for Node.js, plus the Vercel AI SDK middleware.

> [card] [Frameworks](https://docs.promptguard.co/integrations/overview.md#frameworks)
>
> LangChain, LangGraph, LlamaIndex, CrewAI, FastAPI and the Vercel AI SDK.

> [card] [Migrate from OpenAI](https://docs.promptguard.co/guides/migration-from-openai.md)
>
> Move an OpenAI integration onto the proxy instead of the SDK.

## Reference

> [card] [Python SDK reference](https://docs.promptguard.co/sdk-reference/python.md)
>
> Every public class, function and method, generated from the published package.

> [card] [Node.js SDK reference](https://docs.promptguard.co/sdk-reference/node.md)
>
> The same for the npm package.

> [card] [Auto-instrumentation](https://docs.promptguard.co/integrations/auto-instrumentation.md)
>
> Which provider calls `init()` patches, which it does not, and how to check.

> [card] [Error handling](https://docs.promptguard.co/production/error-handling.md)
>
> Every error code the API returns, and how to handle each one.

## Upgrading

> [card] [Upgrade to SDK and CLI 2.0](https://docs.promptguard.co/releases/sdk-v2-upgrade.md)
>
> What 2.0.0 removed, what to use instead, and how to find the calls.

> [card] [Versioning and support](https://docs.promptguard.co/versioning-and-support.md#sdks)
>
> How long each SDK major version gets fixes.

## Troubleshooting

> [card] [Troubleshooting](https://docs.promptguard.co/production/troubleshooting.md)
>
> Authentication, connection, blocked-request and streaming problems, with the
> fix for each.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.