chat
Chat completion on a frontier model: GPT-6.1 Sol and Terra, GPT-5.5, Claude Sonnet 5.5 and Haiku 5.5, Gemini 3.8 Flash, Grok 4.7, GPT-6 Luna (default anthropic/claude-haiku-5.5; see the models tool). Same shape as OpenAI chat: messages, optional max_tokens (default 1024, max 8192), temperature, tools. Price is quoted per call from your input size and max_tokens: (estimated input tokens x input rate + max_tokens x output rate) x 1.4 + $0.0005, minimum $0.002; the 402 states the exact amount. Charged only if the model call succeeds. Thinking models (GPT-5.5, Gemini, Grok, gpt-oss) spend part of max_tokens on reasoning: give them room, or set reasoning_effort (default low). Prompts go to the model's provider and are not stored by PayperWork. No streaming.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stop | No | ||
| model | No | ||
| tools | No | ||
| top_p | No | ||
| messages | Yes | ||
| max_tokens | No | ||
| temperature | No | ||
| tool_choice | No | ||
| response_format | No | ||
| reasoning_effort | No |