Docs · Start here

Quickstart

Use a Produck API key and an ordinary HTTP client to make a text chat completion request. Keep your key on the server.

01

Get an API key

Log in to the authenticated Produck product to obtain your key. Store it as a server-side environment variable named PRODUCK_API_KEY.

Get API key
02

Configure endpoint and auth

Base URL: https://api.produckai.com/v1. Send Authorization: Bearer <Produck API key> and Content-Type: application/json. The chat endpoint is https://api.produckai.com/v1/chat/completions.

03

Make a first request

These curl, Python HTTP, and server-side TypeScript HTTP examples send the same minimal text chat request. The Python example uses requests; install it with python -m pip install requests in your application environment.

Shell
curl https://api.produckai.com/v1/chat/completions \
  -H "Authorization: Bearer $PRODUCK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model":"gpt-oss-120b",
    "messages":[
      {"role":"user","content":"Hello"}
    ]
  }'
Python · requests
import os
import requests

url = "https://api.produckai.com/v1/chat/completions"
headers = {
    "Authorization": f"Bearer {os.environ['PRODUCK_API_KEY']}",
    "Content-Type": "application/json",
}
payload = {"model": "gpt-oss-120b", "messages": [{"role": "user", "content": "Hello"}]}

response = requests.post(url, headers=headers, json=payload, timeout=60)
response.raise_for_status()
print(response.json())
TypeScript · server-side fetch
// Server-side TypeScript (Node.js)
const response = await fetch("https://api.produckai.com/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PRODUCK_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "gpt-oss-120b",
    messages: [{ role: "user", content: "Hello" }],
  }),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());
04

Select a model

Set the model field to one of the public Produck IDs:

View pricing and context before choosing a route.

05

Enable streaming

Add "stream": true to the request body and consume the streamed response. See the complete streaming guide.

06

Next steps

Review the supported request fields, compare the model routes, and test your workload against its latency and token-cost goals.