Add a private AI chatbot to your app with the OpenAI library

Keep the OpenAI library you know, change two lines, and your users' chats run on sealed hardware.

Make an API keyCreate free account

Uses

Private modelIndie developers and startups

How it works

  1. Make an API key, and give it a daily cap.
  2. Point the OpenAI library at Zuzo and pick the private model.
  3. Each answer's headers say what it cost, so you can pass costs on to your users.

The code

Python, with the OpenAI library. Your API key and spending limit come from the console; the docs cover every option.

from openai import OpenAI

client = OpenAI(base_url="https://api.nokycgpu.com/v1", api_key="zuzo_live_...")
reply = client.chat.completions.create(
    model="private",
    messages=[
        {"role": "system", "content": "You are the help assistant for Acme's app."},
        {"role": "user", "content": "How do I reset my password?"},
    ],
)
print(reply.choices[0].message.content)

Questions

Do I have to rewrite my code?

No. Zuzo speaks the same API as OpenAI, so you change the base URL and the key.

What does Private mode mean?

Your users' messages are answered inside sealed computers that not even the people who own them can look inside.

Does streaming work?

Yes, exactly as with OpenAI.

More for developers and small teams