v1
latestOpenAPI 3.1.02026-07-1320186461.3 KBStream Completion
Get a completion response using either one of your organization’s deployed prompts, or by providing completion details including prompt and inputs in the request.
This endpoint acts as a LLM gateway/proxy endpoint to generate completions from different LLMs.
post/api/parea/v1/completion/stream
Request body
Example request
{
"end_user_identifier": "2596@gmail.com",
"inputs": {
"city": "New York"
},
"llm_configuration": {
"function_call": "auto",
"functions": [
{
"description": "Get the current weather in a given location.",
"name": "get_current_weather",
"parameters": {
"properties": {
"location": {
"description": "The city and state, e.g. San Francisco, CA",
"type": "string"
},
"unit": {
"enum": [
"celsius",
"fahrenheit"
],
"type": "string"
}
},
"required": [
"location"
],
"type": "object"
}
}
],
"messages": [
{
"content": "What is the weather in New York",
"role": "user"
}
],
"model": "gpt-4o-mini",
"model_params": {
"max_length": 500,
"model": "gpt-4o-mini",
"temp": 0
},
"provider": "openai"
},
"metadata": {
"purpose": "testing",
"user_id": "user_2Q9afRAKe6SZrc3U7"
},
"tags": [
"weather",
"forecast"
]
}Response
Successful Response
{"stackTrail":"paths:/api/parea/v1/completion/stream:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}