Skip to main content
POST
/
api
/
r2r
/
v3
/
retrieval
/
completion
Prompt-based completion
curl --request POST \
  --url https://api.intelligence.io.solutions/api/r2r/v3/retrieval/completion \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "messages": {
    "role": "system",
    "content": "<string>",
    "name": "<string>",
    "function_call": [
      "<any>"
    ],
    "tool_calls": [
      "<any>"
    ],
    "tool_call_id": "<string>",
    "metadata": [
      "<any>"
    ],
    "structured_content": [
      "<any>"
    ],
    "image_url": "<string>",
    "image_data": [
      "<any>"
    ]
  },
  "generation_config": {
    "model": "<string>",
    "temperature": 123,
    "top_p": 123,
    "max_tokens_to_sample": 123,
    "stream": true,
    "functions": [
      "<any>"
    ],
    "tools": [
      "<any>"
    ],
    "add_generation_kwargs": [
      "<any>"
    ],
    "api_base": "<string>",
    "response_format": [
      {
        "Base Model": {}
      }
    ],
    "extended_thinking": false,
    "thinking_budget": 123,
    "reasoning_effort": "<string>"
  }
}'
{}
The Prompt-Based Completion endpoint allows direct interaction with a language model by sending raw prompts or structured message sequences. It provides a simple interface for generating completions, summaries, or other free-form outputs without performing any retrieval or grounding from the document corpus. This endpoint is ideal for open-ended generation tasks such as text drafting, classification, rewriting, summarization, and chat-like conversations that do not require knowledge integration from R2R’s retrieval pipeline.

Request Body

The request must include a messages list representing the conversational context and an optional generation_config object to control model behavior.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
messages
object

The input prompt

generation_config
object

Model to use (e.g., gpt-4)

Response

200

The response is of type object.