Complete sends the messages of a chat to the AI and asks it to generate a new message.

Changed on
post/v1/ai/complete

Request

Request body

includeReasoningboolean

Whether the response may include reasoning blocks. Older clients don't support them, so they are removed from the response unless this is set.

outputJsonSchemastring

Response

A successful response.

cacheWriteInputTokensinteger

Number of input tokens written to the prompt cache, which some providers (e.g. Claude) bill at a premium.

cachedInputTokensinteger

Number of cache-read (discounted) input tokens; a subset of input_tokens.

inputTokensinteger

Number of full-rate (non-cached) tokens in the input.

outputTokensinteger

Number of tokens in the output.

providerstring

The LLM provider that served the completion (e.g. "claude", "openai", "gemini").

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property ////

    • info

      added the optional property to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status