Browse the docsParameters
Parameters
Every tuning parameter is optional. Send one and your value is used after validation; omit it, or send null, and the deployment default applies. Omission never means “send nothing” - it means “use the default”.
| Parameter | Default | Accepted range | Forwarded | Notes |
|---|---|---|---|---|
| max_tokensinteger | 40000 | 1 - 40000 | yes | The cap equals the default, so 40000 is both the fallback and the maximum. Asking for more is a 422, not a silent clamp. |
| temperaturenumber | 0 | 0 - 2 | yes | Leave it at 0 for extraction. Higher values make the model paraphrase fields instead of copying them. |
| top_pnumber | - | - | ignored | Accepted so OpenAI SDKs do not break. Has no effect. |
| reasoning_effortstring | - | - | ignored | An OpenAI reasoning-tier concept that does not apply to this model. |
| streamboolean | false | - | ignored | Responses are always returned whole. true is treated as false. |
Any field we do not recognise is dropped at the edge rather than rejected, so a newer OpenAI SDK will not break against this API - and arbitrary client input never reaches the model.
import os
from openai import OpenAI
API_KEY = "Your API Key"
BASE_URL = "https://labs-api.petpooja.com/v1"
MODEL = "chitragupta"
client = OpenAI(api_key=API_KEY, base_url=BASE_URL)
r = client.chat.completions.create(
model=MODEL,
messages=[{"role": "user", "content": "Extract this invoice as JSON."}],
temperature=0, # 0..2 (omit -> default 0)
max_tokens=200, # 1..40000 (omit -> default 40000)
)