Guide

Your first request

Create an application and a key, point an OpenAI client at Penweir and see what it did. Works the same on Docker and Kubernetes.

This guide assumes Penweir is running, you created the first admin, and a provider and pipeline are configured. If not, start with the Docker guide or the Helm guide.

1. Create an application and a key

Open the dashboard (http://127.0.0.1:8081, or the port-forward from the Helm guide) and sign in.

  1. Applications, New application. Give it the name of the system that will call Penweir.
  2. New key. Copy the key: it is shown once.

From the command line, the same thing is:

docker compose exec penweir penweir apps create my-app
docker compose exec penweir penweir keys create my-app

On Kubernetes, use kubectl -n penweir exec deploy/penweir -- penweir apps create my-app.

2. Point your client at Penweir

Any OpenAI client works. Change the base URL and the key, and leave the rest of your code alone:

from openai import OpenAI

client = OpenAI(base_url="http://127.0.0.1:8080/v1", api_key="pw_...")
print(client.chat.completions.create(
    model="cloud/default",
    messages=[{"role": "user", "content": "Hello from jan@example.com"}],
).choices[0].message.content)

Streaming and tool calls work the same way. GET /v1/models lists the models you configured.

3. See what it did

  • Pipelines, default, Test a prompt shows what would leave the building, without sending anything.
  • Audit log shows the request you just made. It records metadata only: time, pipeline, source, field counts, model, latency and status. Never the prompt or the answer.

In the example above, the email address is replaced by a token before the request reaches the provider, and restored in the reply you get back.