For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Contact usJoin our Discord
HomeAdministration & GovernanceDevelopment and IntegrationAgent ForgeAPI ReferenceSDK Docs
HomeAdministration & GovernanceDevelopment and IntegrationAgent ForgeAPI ReferenceSDK Docs
  • Getting Started
    • Quick Start
  • Available Models
    • LLMs
    • LVMs
    • Embedding Models
    • Audio Models
    • Reranker Models
    • Model Enumerations
    • Prompt Formatting
  • Using LLMs
    • Accessing LLMs
    • Basic Prompting
    • Prompt Engineering
    • Chat Completions
    • Chaining and Retrieval
    • Tool Calling
    • Agents
    • Streaming
    • Chat Vision
    • Embeddings
  • Secure and Filter Inputs
    • PII Detection
    • Injection Prevention
  • Secure and Filter Outputs
    • Factuality Checks
    • Toxicity Detection
  • Integration Examples
    • Custom Output Structuring
    • Data Chat with LLMs
    • Data Extraction + Factuality
    • LangChain Integration
    • Code Assistant
  • Support
    • Contact Us
LogoLogo
Contact usJoin our Discord
On this page
  • Sounds pretty great, right? Follow the steps below to start leveraging trustworthy LLMs:
  • Get access to Prediction Guard Enterprise
  • Start using one of our LLMs!
  • Download the SDK for your favorite language
Getting Started

Quick Start

Reliable, future-proof AI predictions

Was this page helpful?

LLMs

Next
Built with

Technical teams need to figure out how to integrate the latest Large Language Models (LLMs), but:

  • You can’t build robust systems with inconsistent, unvalidated outputs; and
  • LLM integrations scare corporate lawyers, finance departments, and security professionals due to hallucinations, cost, lack of compliance (e.g., HIPAA), leaked IP/PII, and “injection” vulnerabilities.

Some companies are moving forward anyway by investing tons of engineering time/money in their own wrappers around LLMs and expensive hosting with OpenAI/Azure. Others are ignoring these issues and pressing forward with fragile and risky LLM integrations.

At Prediction Guard, we think that you should get useful output from compliant AI systems (without crazy implementation/hosting costs), so our solution lets you:

  1. De-risk LLM inputs to remove PII and prompt injections;
  2. Validate and check LLM outputs to guard against hallucination, toxicity, and inconsistencies; and
  3. Implement private and compliant LLM systems (HIPAA and self-hosted) that give your legal counsel a warm fuzzy feeling while still delighting your customers with AI features.

Sounds pretty great, right? Follow the steps below to start leveraging trustworthy LLMs:

1

Get access to Prediction Guard Enterprise

We host and control the latest LLMs for you in our secure and privacy-conserving enterprise platform, so you can focus on your prompts and chains. To access the hosted LLMs, contact us here to get an enterprise access token. You will need this access token to continue.

2

Start using one of our LLMs!

Suppose you want to prompt an LLM to answer a user query from a chat application. You can set up a message thread, which includes a system prompt (that instructs the LLM how to behave in responding) as follows:

1[
2 {
3 "role": "system",
4 "content": "You are a helpful assistant. Your model is hosted by Prediction Guard, a leading AI company."
5 },
6 {
7 "role": "user",
8 "content": "Where can I access the LLMs in a safe and secure environment?"
9 }
10]
3

Download the SDK for your favorite language

You can then use any of our official SDKs or REST API to prompt one of our LLMs!

1import json
2import os
3
4from predictionguard import PredictionGuard
5
6
7# Set your Prediction Guard API key and URL as environmental variables.
8os.environ["PREDICTIONGUARD_API_KEY"] = "<api key>"
9os.environ["PREDICTIONGUARD_URL"] = "<pg url>"
10
11# You can also set them when initializing the client.
12client = PredictionGuard(
13 api_key="<Your PG API Key>",
14 url="<Your PG API URL>"
15)
16
17messages = [
18 {
19 "role": "system",
20 "content": "You are a helpful chatbot that helps people learn."
21 },
22 {
23 "role": "user",
24 "content": "What is a good way to learn to code?"
25 }
26]
27
28result = client.chat.completions.create(
29 model="gpt-oss-120b",
30 messages=messages,
31 max_completion_tokens=100
32)
33
34print(json.dumps(
35 result,
36 sort_keys=True,
37 indent=4,
38 separators=(',', ': ')
39))

Note, you will need to replace <your api key> in the above examples with your actual access token.