Chat completion
carpe_chatRun OpenAI-compatible chat completions with a private TEE route or cost-based market routing, returning the answer, usage, billed cost, and serving market.
Instructions
Run a chat completion on Carpe Diem (OpenAI-compatible; Venice models: GPT, Claude, Gemini, DeepSeek, GLM, Qwen, Llama, uncensored models…). Two surfaces: route "carpe" (/v1, Carpe's TEE, private) or route "router" (/router, cheapest market). Returns the answer plus usage, the exact cost billed and which market served it. Supports function tools, response_format (JSON schema), reasoning_effort and Venice web search. Paid — use carpe_quote first for expensive requests.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| stop | No | ||
| extra | No | Additional body fields passed through verbatim (e.g. venice_parameters, frequency_penalty). | |
| model | No | Model id (default deepseek-v4-flash). See carpe_list_models type "text". | |
| route | No | "carpe" → /v1: Carpe alone, always in its TEE, Carpe price. "router" → /router: best price across markets (may be served outside a TEE; see privacy). Default from CARPE_DEFAULT_ROUTE. | |
| tools | No | OpenAI function tools; tool calls are returned, not executed. | |
| top_p | No | ||
| prompt | No | User message (shortcut for messages). | |
| system | No | System prompt, used with prompt. | |
| privacy | No | route "router" only. true = TEE markets only (Carpe, Chutes, Venice); "private" = for models Venice runs privately, only markets that keep nothing. Ignored on route "carpe", which is always TEE. | |
| messages | No | Full OpenAI-style messages array (takes precedence over prompt/system). | |
| provider | No | route "router" only: OpenRouter-style routing preferences. | |
| max_tokens | No | Output token cap (also bounds the cost). | |
| web_search | No | Venice web search (extra flat fee per search that runs). | |
| temperature | No | ||
| tool_choice | No | ||
| response_format | No | e.g. {"type":"json_schema","json_schema":{…}} | |
| reasoning_effort | No | none | low | medium | high … (model-dependent). |