Skip to main content
Generate a chat completion with a Reigent.
  • URL: /v1/chat/completions
  • Method: POST
  • Headers:
  • Request:

    model string Optional Default: Agent’s Configured Model Allowed values:
    • google/gemini-2.5-flash

    messages array (min length: 1) Required

    temperature number Optional Range: 0 to 2 Default: 1

    max_tokens integer Optional Minimum: 1

    top_p number Optional Range: 0 to 1

    n integer Optional Minimum: 1

    seed number Optional Range: 0 to 2^53-1

    stream boolean Optional

    stop string or array[string] Optional

    presence_penalty number Optional Range: -2.0 to 2.0

    frequency_penalty number Optional Range: -2.0 to 2.0

    logit_bias object Optional Key format: Token IDs as string numbers Value range: -100 to 100

    logprobs boolean Optional

    top_logprobs number Optional

    user string Optional

    response_format object Optional Specifies the format of the model’s output. Use this to request structured responses.
    tools array Optional
    A list of tools the model may call

    tool_choice string or object Optional
    Controls which tool is called
    Allowed string values: "none", "auto"
    Or specify a tool with:

  • Sample Request
  1. Type: Text
  1. Type: Image (in URL)
  1. Type: Image (in Base64)
  1. Type: Docs (PDF)
  1. Type: Docs
  • Supported File Types: - json, xlsx, xlsm, csv, md, pptx, docx, txt
  1. Type: JSON Schema Response

  • Response:
  1. Without Tools
  1. With Tools
  1. With JSON Schema

  • Error