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
Stream Completion
curl --request POST \ --url https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/completion/stream \ --header 'Content-Type: application/json' \ --header 'x-user-id: <api-key>' \ --data '{ "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" ]}'
import requests
url = "https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/completion/stream"
payload = {
"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"]
}
headers = {
"x-user-id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'x-user-id': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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']
})
};
fetch('https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/completion/stream', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
This is the ID for a specific deployed prompt. You can find your deployed prompts on the Deployments tab. If a deployment_id is provided, Parea will fetch all of the associated configuration including model name, model parameters, and any associated functions. Any information provided on the llm_configuration field will be used instead of the associated deployed prompts fields.
If specified, this log and its entire associated trace will logged with this probability. Must be between 0 and 1 (incl.). Defaults to 1.0 (i.e., keeping all logs)
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Parea AI","colors":{"primary":"#9563FF","light":"#AE87FF","dark":"#0D001D"},"favicon":"/favicon.png","logo":{"light":"https://mintcdn.com/pareaai/3kurg3MZRrsWWk8t/logo/parea-light.png?fit=max\u0026auto=format\u0026n=3kurg3MZRrsWWk8t\u0026q=85\u0026s=c32fc81b38c3586ed7187a84b3e0c8d9","dark":"https://mintcdn.com/pareaai/3kurg3MZRrsWWk8t/logo/parea-dark.png?fit=max\u0026auto=format\u0026n=3kurg3MZRrsWWk8t\u0026q=85\u0026s=0c9b98a6abbc1a8b0851dda2467305d3"},"api":{"playground":{"display":"simple"},"mdx":{"server":"https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1","auth":{"method":"key","name":"x-api-key"}}},"background":{"decoration":null,"color":{"light":null,"dark":"#090014"}},"navbar":{"links":[{"label":"Discord","href":"https://discord.gg/p7CUwSKJD6"}],"primary":{"type":"button","label":"HomePage","href":"https://www.parea.ai/"}},"footer":{"socials":{"twitter":"https://twitter.com/PareaAI","github":"https://github.com/parea-ai","linkedin":"https://www.linkedin.com/company/parea-ai/"}},"integrations":{"posthog":{"apiKey":"phc_QJDW2uNYJGwIl7dXs4WLDWEuntie6Ye1TQRW9p3re18","apiHost":"https://eu.posthog.com"}},"navigation":{"global":{"anchors":[{"anchor":"Github","href":"https://github.com/parea-ai/parea-sdk","icon":"github"},{"anchor":"Discord","href":"https://discord.gg/p7CUwSKJD6","icon":"discord"},{"anchor":"Chat with Founders","href":"https://calendly.com/parea-ai/chat","icon":"phone"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pareaai","hasAudioNarration":false,"actualSubdomain":"pareaai","customDomains":["docs.parea.ai"],"gitSource":{"type":"github","owner":"parea-ai","repo":"parea-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e60a4c43fec466d7925c","collectionId":"662c90c1-bcb2-4744-a0d9-5f805b4d92b4","schemaVersion":"v2"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6a21e60a4c43fec466d7925c:success","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"Documentation","count":40},{"language":"default","tag":"Guides","count":33},{"language":"default","tag":"API Reference","count":22},{"language":"default","tag":"Blog","count":22},{"language":"default","tag":"Observability","count":11},{"language":"default","tag":"Integrations","count":7},{"language":"default","tag":"Experiments","count":5},{"language":"default","tag":"Tracing","count":5},{"language":"default","tag":"Manual Review","count":5},{"language":"default","tag":"Playground","count":5}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/llm-proxy/stream-completion","slug":"/api-reference/llm-proxy/stream-completion","pageMetadata":{"openapi":"post /api/parea/v1/completion/stream","title":"Stream Completion","description":"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.\n\nThis endpoint acts as a LLM gateway/proxy endpoint to generate completions from different LLMs.","href":"/api-reference/llm-proxy/stream-completion"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"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.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"This endpoint acts as a LLM gateway/proxy endpoint to generate completions from different LLMs.\"\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"openapi":"post /api/parea/v1/completion/stream","title":"Stream Completion","description":"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.\n\nThis endpoint acts as a LLM gateway/proxy endpoint to generate completions from different LLMs.","href":"/api-reference/llm-proxy/stream-completion"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Stream Completion","description":"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.\n\nThis endpoint acts as a LLM gateway/proxy endpoint to generate completions from different LLMs.","operationId":"stream_completion_api_parea_v1_completion_stream_post","requestBody":"83d1e36f-d4b4-4e1c-88ac-a110d4ec6fc7","responses":{"200":"2e26ed43-e68c-4671-a4ba-4e21fab8270d","422":"1766d35b-99fe-4f2f-af69-578e93e1c565"},"security":["b130ccde-6ab2-4287-883d-f0c7cb321f0b","44a30098-ece1-408e-a031-f37b6ab86d7e","84adc3bc-2a96-478a-a15f-0859ac0413c9"],"method":"post","type":"path","servers":[],"path":"/api/parea/v1/completion/stream","baseUrlOptions":["https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1"],"title":"Stream Completion","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"llm_inputs":{"oneOf":[{"type":"object","title":"Llm Inputs","description":"Key-value pairs as inputs to prompt template. Only needs to be provided if `deployment_id` is provided or `llm_configuration.messages` are templated.","uniqueKey":"llm_inputs.oneOf.0","typeLabel":"Llm Inputs · object"},{"type":"null","title":"Llm Inputs","description":"Key-value pairs as inputs to prompt template. Only needs to be provided if `deployment_id` is provided or `llm_configuration.messages` are templated.","uniqueKey":"llm_inputs.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_inputs","typeLabel":"Llm Inputs · object | null"},"llm_configuration":{"type":"object","title":"LLMInputsSchema","description":"LLM configuration parameters such as messages, functions, etc.","default":{},"properties":{"model":{"oneOf":[{"type":"string","title":"Model","description":"Model name","uniqueKey":"llm_configuration.model.oneOf.0","typeLabel":"string"},{"type":"null","title":"Model","description":"Model name","uniqueKey":"llm_configuration.model.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.model","typeLabel":"string | null"},"provider":{"oneOf":[{"type":"string","title":"ProviderName","description":"Provider name","enum":["openai","azure","anthropic","anyscale","vertexai","aws_bedrock","openrouter","mistral","litellm","groq","fireworks","cohere"],"uniqueKey":"llm_configuration.provider.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Provider name","uniqueKey":"llm_configuration.provider.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.provider","typeLabel":"enum\u003cstring> | null"},"model_params":{"oneOf":[{"type":"object","title":"ModelParamsSchema","description":"Model parameters","properties":{"model":{"oneOf":[{"type":"string","title":"Model","description":"Model name","default":"","uniqueKey":"llm_configuration.model_params.oneOf.0.model.oneOf.0","typeLabel":"string"},{"type":"null","title":"Model","description":"Model name","default":"","uniqueKey":"llm_configuration.model_params.oneOf.0.model.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.model_params.oneOf.0.model","typeLabel":"string | null"},"temp":{"oneOf":[{"type":"number","title":"Temp","description":"Temperature","default":1,"maximum":1,"minimum":0,"uniqueKey":"llm_configuration.model_params.oneOf.0.temp.oneOf.0","typeLabel":"number"},{"type":"null","title":"Temp","description":"Temperature","default":1,"uniqueKey":"llm_configuration.model_params.oneOf.0.temp.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.model_params.oneOf.0.temp","typeLabel":"number | null"},"top_p":{"oneOf":[{"type":"number","title":"Top P","description":"Top p","default":1,"maximum":1,"minimum":0,"uniqueKey":"llm_configuration.model_params.oneOf.0.top_p.oneOf.0","typeLabel":"number"},{"type":"null","title":"Top P","description":"Top p","default":1,"uniqueKey":"llm_configuration.model_params.oneOf.0.top_p.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.model_params.oneOf.0.top_p","typeLabel":"number | null"},"frequency_penalty":{"oneOf":[{"type":"number","title":"Frequency Penalty","description":"Frequency penalty","default":0,"maximum":2,"minimum":-2,"uniqueKey":"llm_configuration.model_params.oneOf.0.frequency_penalty.oneOf.0","typeLabel":"number"},{"type":"null","title":"Frequency Penalty","description":"Frequency penalty","default":0,"uniqueKey":"llm_configuration.model_params.oneOf.0.frequency_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.model_params.oneOf.0.frequency_penalty","typeLabel":"number | null"},"presence_penalty":{"oneOf":[{"type":"number","title":"Presence Penalty","description":"Presence penalty","default":0,"maximum":2,"minimum":-2,"uniqueKey":"llm_configuration.model_params.oneOf.0.presence_penalty.oneOf.0","typeLabel":"number"},{"type":"null","title":"Presence Penalty","description":"Presence penalty","default":0,"uniqueKey":"llm_configuration.model_params.oneOf.0.presence_penalty.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.model_params.oneOf.0.presence_penalty","typeLabel":"number | null"},"max_length":{"oneOf":[{"type":"integer","title":"Max Length","description":"Max length of the output","uniqueKey":"llm_configuration.model_params.oneOf.0.max_length.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Max Length","description":"Max length of the output","uniqueKey":"llm_configuration.model_params.oneOf.0.max_length.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.model_params.oneOf.0.max_length","typeLabel":"integer | null"},"response_format":{"oneOf":[{"type":"object","title":"Response Format","description":"Response format","uniqueKey":"llm_configuration.model_params.oneOf.0.response_format.oneOf.0","typeLabel":"Response Format · object"},{"type":"null","title":"Response Format","description":"Response format","uniqueKey":"llm_configuration.model_params.oneOf.0.response_format.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.model_params.oneOf.0.response_format","typeLabel":"Response Format · object | null"},"safe_prompt":{"oneOf":[{"type":"boolean","title":"Safe Prompt","description":"Safe prompt. Only used for Mistral","uniqueKey":"llm_configuration.model_params.oneOf.0.safe_prompt.oneOf.0","typeLabel":"boolean"},{"type":"null","title":"Safe Prompt","description":"Safe prompt. Only used for Mistral","uniqueKey":"llm_configuration.model_params.oneOf.0.safe_prompt.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.model_params.oneOf.0.safe_prompt","typeLabel":"boolean | null"}},"uniqueKey":"llm_configuration.model_params.oneOf.0","typeLabel":"ModelParamsSchema · object"},{"type":"null","description":"Model parameters","uniqueKey":"llm_configuration.model_params.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.model_params","typeLabel":"ModelParamsSchema · object | null"},"messages":{"oneOf":[{"type":"array","items":{"properties":{"content":{"oneOf":[{"type":"string","title":"Content","description":"Message content","default":"","uniqueKey":"llm_configuration.messages.oneOf.0.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"llm_configuration.messages.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"any"},"title":"Content","description":"Message content","default":"","uniqueKey":"llm_configuration.messages.oneOf.0.items.[INDEX].content.oneOf.1","typeLabel":"any[]"},{"type":"null","title":"Content","description":"Message content","default":"","uniqueKey":"llm_configuration.messages.oneOf.0.items.[INDEX].content.oneOf.2","typeLabel":"null"}],"uniqueKey":"llm_configuration.messages.oneOf.0.items.[INDEX].content","typeLabel":"string | any[] | null"},"role":{"type":"string","title":"Role","description":"Message role","default":"user","enum":["user","assistant","system","user","assistant","function","tool"],"uniqueKey":"llm_configuration.messages.oneOf.0.items.[INDEX].role","typeLabel":"enum\u003cstring>"}},"type":"object","title":"MessageSchema","uniqueKey":"llm_configuration.messages.oneOf.0.items.[INDEX]","typeLabel":"MessageSchema · object"},"title":"Messages","description":"List of messages","uniqueKey":"llm_configuration.messages.oneOf.0","typeLabel":"MessageSchema · object[]"},{"type":"null","title":"Messages","description":"List of messages","uniqueKey":"llm_configuration.messages.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.messages","typeLabel":"MessageSchema · object[] | null"},"history":{"oneOf":[{"type":"array","items":{"properties":{"content":{"oneOf":[{"type":"string","title":"Content","description":"Message content","default":"","uniqueKey":"llm_configuration.history.oneOf.0.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{}],"uniqueKey":"llm_configuration.history.oneOf.0.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"any"},"title":"Content","description":"Message content","default":"","uniqueKey":"llm_configuration.history.oneOf.0.items.[INDEX].content.oneOf.1","typeLabel":"any[]"},{"type":"null","title":"Content","description":"Message content","default":"","uniqueKey":"llm_configuration.history.oneOf.0.items.[INDEX].content.oneOf.2","typeLabel":"null"}],"uniqueKey":"llm_configuration.history.oneOf.0.items.[INDEX].content","typeLabel":"string | any[] | null"},"role":{"type":"string","title":"Role","description":"Message role","default":"user","enum":["user","assistant","system","user","assistant","function","tool"],"uniqueKey":"llm_configuration.history.oneOf.0.items.[INDEX].role","typeLabel":"enum\u003cstring>"}},"type":"object","title":"MessageSchema","uniqueKey":"llm_configuration.history.oneOf.0.items.[INDEX]","typeLabel":"MessageSchema · object"},"title":"History","description":"List of history messages which are prepended to messages. Useful for chatbot applications which rely on deployed prompts.","uniqueKey":"llm_configuration.history.oneOf.0","typeLabel":"MessageSchema · object[]"},{"type":"null","title":"History","description":"List of history messages which are prepended to messages. Useful for chatbot applications which rely on deployed prompts.","uniqueKey":"llm_configuration.history.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.history","typeLabel":"MessageSchema · object[] | null"},"functions":{"oneOf":[{"type":"array","items":{"oneOf":[{}],"uniqueKey":"llm_configuration.functions.oneOf.0.items.[INDEX]","typeLabel":"any"},"title":"Functions","description":"List of function schemas, following the OpenAI API format","uniqueKey":"llm_configuration.functions.oneOf.0","typeLabel":"any[]"},{"type":"null","title":"Functions","description":"List of function schemas, following the OpenAI API format","uniqueKey":"llm_configuration.functions.oneOf.1","typeLabel":"null"}],"uniqueKey":"llm_configuration.functions","typeLabel":"any[] | null"},"function_call":{"oneOf":[{"type":"string","title":"Function Call","description":"Optionally, specify the fnction call, following OpenAI API behavior.","uniqueKey":"llm_configuration.function_call.oneOf.0","typeLabel":"string"},{"type":"object","title":"Function Call","description":"Optionally, specify the fnction call, following OpenAI API behavior.","additionalProperties":{"type":"string","uniqueKey":"llm_configuration.function_call.oneOf.1.additionalProperties","typeLabel":"string"},"uniqueKey":"llm_configuration.function_call.oneOf.1","typeLabel":"Function Call · object"},{"type":"null","title":"Function Call","description":"Optionally, specify the fnction call, following OpenAI API behavior.","uniqueKey":"llm_configuration.function_call.oneOf.2","typeLabel":"null"}],"uniqueKey":"llm_configuration.function_call","typeLabel":"string | Function Call · object | null"}},"uniqueKey":"llm_configuration","typeLabel":"LLMInputsSchema · object"},"project_name":{"oneOf":[{"type":"string","title":"Project Name","description":"Project name which is used to associate the log with a project.","default":"default","uniqueKey":"project_name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Project Name","description":"Project name which is used to associate the log with a project.","default":"default","uniqueKey":"project_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"project_name","typeLabel":"string | null"},"project_uuid":{"oneOf":[{"type":"string","title":"Project Uuid","description":"Project UUID which is used to associate the log with a project. Does not need to be provided if the `project_name` is provided.","uniqueKey":"project_uuid.oneOf.0","typeLabel":"string"},{"type":"null","title":"Project Uuid","description":"Project UUID which is used to associate the log with a project. Does not need to be provided if the `project_name` is provided.","uniqueKey":"project_uuid.oneOf.1","typeLabel":"null"}],"uniqueKey":"project_uuid","typeLabel":"string | null"},"experiment_uuid":{"oneOf":[{"type":"string","title":"Experiment Uuid","description":"Experiment UUID which is used to associate the log with an experiment.","uniqueKey":"experiment_uuid.oneOf.0","typeLabel":"string"},{"type":"null","title":"Experiment Uuid","description":"Experiment UUID which is used to associate the log with an experiment.","uniqueKey":"experiment_uuid.oneOf.1","typeLabel":"null"}],"uniqueKey":"experiment_uuid","typeLabel":"string | null"},"parent_trace_id":{"oneOf":[{"type":"string","title":"Parent Trace Id","description":"UUID of the parent log. If given, will be used to associate the generation in a chain \u0026 create hierarchical nested logs.","uniqueKey":"parent_trace_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Parent Trace Id","description":"UUID of the parent log. If given, will be used to associate the generation in a chain \u0026 create hierarchical nested logs.","uniqueKey":"parent_trace_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"parent_trace_id","typeLabel":"string | null"},"root_trace_id":{"oneOf":[{"type":"string","title":"Root Trace Id","description":"UUID of the root log. If given, will be used to associate the generation in a chain \u0026 create hierarchical nested logs.","uniqueKey":"root_trace_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Root Trace Id","description":"UUID of the root log. If given, will be used to associate the generation in a chain \u0026 create hierarchical nested logs.","uniqueKey":"root_trace_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"root_trace_id","typeLabel":"string | null"},"end_user_identifier":{"oneOf":[{"type":"string","title":"End User Identifier","description":"Special field to track the end user which is interacting with your LLM app.","uniqueKey":"end_user_identifier.oneOf.0","typeLabel":"string"},{"type":"null","title":"End User Identifier","description":"Special field to track the end user which is interacting with your LLM app.","uniqueKey":"end_user_identifier.oneOf.1","typeLabel":"null"}],"uniqueKey":"end_user_identifier","typeLabel":"string | null"},"deployment_id":{"oneOf":[{"type":"string","title":"Deployment Id","description":"This is the ID for a specific deployed prompt. You can find your deployed prompts on the Deployments tab. If a deployment_id is provided, Parea will fetch all of the associated configuration including model name, model parameters, and any associated functions. Any information provided on the llm_configuration field will be used instead of the associated deployed prompts fields.","uniqueKey":"deployment_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Deployment Id","description":"This is the ID for a specific deployed prompt. You can find your deployed prompts on the Deployments tab. If a deployment_id is provided, Parea will fetch all of the associated configuration including model name, model parameters, and any associated functions. Any information provided on the llm_configuration field will be used instead of the associated deployed prompts fields.","uniqueKey":"deployment_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"deployment_id","typeLabel":"string | null"},"eval_metric_ids":{"oneOf":[{"type":"array","items":{"type":"integer","uniqueKey":"eval_metric_ids.oneOf.0.items.[INDEX]","typeLabel":"integer"},"title":"Eval Metric Ids","description":"List of evaluation metric IDs deployed on Parea which should be used to evaluate the completion output.","uniqueKey":"eval_metric_ids.oneOf.0","typeLabel":"integer[]"},{"type":"null","title":"Eval Metric Ids","description":"List of evaluation metric IDs deployed on Parea which should be used to evaluate the completion output.","uniqueKey":"eval_metric_ids.oneOf.1","typeLabel":"null"}],"uniqueKey":"eval_metric_ids","typeLabel":"integer[] | null"},"metadata":{"oneOf":[{"type":"object","title":"Metadata","description":"Key-value pairs to be associated with the log.","uniqueKey":"metadata.oneOf.0","typeLabel":"Metadata · object"},{"type":"null","title":"Metadata","description":"Key-value pairs to be associated with the log.","uniqueKey":"metadata.oneOf.1","typeLabel":"null"}],"uniqueKey":"metadata","typeLabel":"Metadata · object | null"},"tags":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"tags.oneOf.0.items.[INDEX]","typeLabel":"string"},"title":"Tags","description":"List of tags to be associated with the log.","uniqueKey":"tags.oneOf.0","typeLabel":"string[]"},{"type":"null","title":"Tags","description":"List of tags to be associated with the log.","uniqueKey":"tags.oneOf.1","typeLabel":"null"}],"uniqueKey":"tags","typeLabel":"string[] | null"},"target":{"oneOf":[{"type":"string","title":"Target","description":"Optional ground truth output for the inputs. Will be used for evaluation and can be used when creating a test case from the log.","uniqueKey":"target.oneOf.0","typeLabel":"string"},{"type":"null","title":"Target","description":"Optional ground truth output for the inputs. Will be used for evaluation and can be used when creating a test case from the log.","uniqueKey":"target.oneOf.1","typeLabel":"null"}],"uniqueKey":"target","typeLabel":"string | null"},"trace_id":{"oneOf":[{"type":"string","title":"Trace Id","description":"UUID of the generation log. If not given, will be auto-generated.","uniqueKey":"trace_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Trace Id","description":"UUID of the generation log. If not given, will be auto-generated.","uniqueKey":"trace_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"trace_id","typeLabel":"string | null"},"trace_name":{"oneOf":[{"type":"string","title":"Trace Name","description":"Name of the generation log. If not given, will be auto-generated in the format `llm-{provider}`.","uniqueKey":"trace_name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Trace Name","description":"Name of the generation log. If not given, will be auto-generated in the format `llm-{provider}`.","uniqueKey":"trace_name.oneOf.1","typeLabel":"null"}],"uniqueKey":"trace_name","typeLabel":"string | null"},"provider_api_key":{"oneOf":[{"type":"string","title":"Provider Api Key","description":"Provider API key to generate response. If not given, API keys saved on the platform will be used","uniqueKey":"provider_api_key.oneOf.0","typeLabel":"string"},{"type":"null","title":"Provider Api Key","description":"Provider API key to generate response. If not given, API keys saved on the platform will be used","uniqueKey":"provider_api_key.oneOf.1","typeLabel":"null"}],"uniqueKey":"provider_api_key","typeLabel":"string | null"},"cache":{"type":"boolean","title":"Cache","description":"If true, the completion will be cached to avoid latency \u0026 cost for any subsequent completion using the same inputs.","default":true,"uniqueKey":"cache","typeLabel":"boolean"},"log_omit_inputs":{"type":"boolean","title":"Log Omit Inputs","description":"If true, the inputs, llm_configuration.messages, llm_configuration.functions, llm_configuration.model_params will not be logged.","default":false,"uniqueKey":"log_omit_inputs","typeLabel":"boolean"},"log_omit_outputs":{"type":"boolean","title":"Log Omit Outputs","description":"If true, the generated response will not be logged.","default":false,"uniqueKey":"log_omit_outputs","typeLabel":"boolean"},"log_omit":{"type":"boolean","title":"Log Omit","description":"Equivalent to setting both log_omit_inputs and log_omit_outputs to true.","default":false,"uniqueKey":"log_omit","typeLabel":"boolean"},"log_sample_rate":{"oneOf":[{"type":"number","title":"Log Sample Rate","description":"If specified, this log and its entire associated trace will logged with this probability. Must be between 0 and 1 (incl.). Defaults to 1.0 (i.e., keeping all logs)","default":1,"maximum":1,"minimum":0,"uniqueKey":"log_sample_rate.oneOf.0","typeLabel":"number"},{"type":"null","title":"Log Sample Rate","description":"If specified, this log and its entire associated trace will logged with this probability. Must be between 0 and 1 (incl.). Defaults to 1.0 (i.e., keeping all logs)","default":1,"uniqueKey":"log_sample_rate.oneOf.1","typeLabel":"null"}],"uniqueKey":"log_sample_rate","typeLabel":"number | null"},"inference_id":{"oneOf":[{"type":"string","title":"Inference Id","description":"Deprecated field which is the same `trace_id`","uniqueKey":"inference_id.oneOf.0","typeLabel":"string"},{"type":"null","title":"Inference Id","description":"Deprecated field which is the same `trace_id`","uniqueKey":"inference_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"inference_id","typeLabel":"string | null"},"name":{"oneOf":[{"type":"string","title":"Name","description":"Deprecated field","uniqueKey":"name.oneOf.0","typeLabel":"string"},{"type":"null","title":"Name","description":"Deprecated field","uniqueKey":"name.oneOf.1","typeLabel":"null"}],"uniqueKey":"name","typeLabel":"string | null"},"retry":{"type":"boolean","title":"Retry","description":"Deprecated field","default":false,"uniqueKey":"retry","typeLabel":"boolean"},"fallback_strategy":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"fallback_strategy.oneOf.0.items.[INDEX]","typeLabel":"string"},"title":"Fallback Strategy","description":"Deprecated field","uniqueKey":"fallback_strategy.oneOf.0","typeLabel":"string[]"},{"type":"null","title":"Fallback Strategy","description":"Deprecated field","uniqueKey":"fallback_strategy.oneOf.1","typeLabel":"null"}],"uniqueKey":"fallback_strategy","typeLabel":"string[] | null"},"stream":{"type":"boolean","title":"Stream","description":"Deprecated field. Use /completion/stream instead.","default":false,"uniqueKey":"stream","typeLabel":"boolean"}},"type":"object","title":"CompletionsSchema","examples":[{"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"]},{"deployment_id":"p-qZrnFesaeCpqcXJ_yL3wi","llm_inputs":{"x":"Golang","y":"Fiber"},"metadata":{"purpose":"testing"}}],"uniqueKey":"","typeLabel":"CompletionsSchema · object"},"examples":{"Example":{"title":"Example","value":{"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"]}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"2e26ed43-e68c-4671-a4ba-4e21fab8270d":{"description":"Successful Response","content":{"application/json":{"schema":{}}},"exampleType":"generated"},"1766d35b-99fe-4f2f-af69-578e93e1c565":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"b130ccde-6ab2-4287-883d-f0c7cb321f0b":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"x-user-id","scopes":[]}},"44a30098-ece1-408e-a031-f37b6ab86d7e":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"x-user-id","scopes":[]}},"84adc3bc-2a96-478a-a15f-0859ac0413c9":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"x-user-id","scopes":[]}}},"servers":{},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-user-id","scopes":[]},"schema":{"title":"x-user-id","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"APIKeyHeader","name":"x-user-id"}],"title":"APIKeyHeader"},{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-user-id","scopes":[]},"schema":{"title":"x-user-id","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"APIKeyHeader","name":"x-user-id"}],"title":"APIKeyHeader"},{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-user-id","scopes":[]},"schema":{"title":"x-user-id","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"APIKeyHeader","name":"x-user-id"}],"title":"APIKeyHeader"}]},"originalFileLocation":"openapi.json"},"subdomain":"pareaai","siteName":"Parea AI","title":"Stream Completion - Parea AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T22:58:28.217Z","originalFileLocation":"api-reference/llm-proxy/stream-completion.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"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.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Parea AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pareaai/gB2mc3qTsxvE_WBo/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/pareaai/gB2mc3qTsxvE_WBo/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pareaai/gB2mc3qTsxvE_WBo/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/pareaai/gB2mc3qTsxvE_WBo/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/pareaai/gB2mc3qTsxvE_WBo/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/pareaai/gB2mc3qTsxvE_WBo/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pareaai/gB2mc3qTsxvE_WBo/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/pareaai/gB2mc3qTsxvE_WBo/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/pareaai/gB2mc3qTsxvE_WBo/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Stream Completion - Parea AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"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.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Parea AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.parea.ai/api-reference/llm-proxy/stream-completion\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://pareaai.mintlify.app/_mintlify/api/og/v2?division=LLM+Proxy\u0026amp;title=Stream+Completion\u0026amp;description=Get+a+completion+response+using+either+one+of+your+organization%C3%A2%E2%82%AC%E2%84%A2s+deployed+prompts%2C+or+by+providing+completion+details+including+prompt+and+inputs+in+the+requ\u0026amp;theme=76f3f976f3374a923e121b3f\u0026amp;signature=cc8bb0eef4afb6d94d2602fb93a1ead55cbfdb8b04d8e449fbeac3a21b71d071\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Stream Completion - Parea AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"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.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://pareaai.mintlify.app/_mintlify/api/og/v2?division=LLM+Proxy\u0026amp;title=Stream+Completion\u0026amp;description=Get+a+completion+response+using+either+one+of+your+organization%C3%A2%E2%82%AC%E2%84%A2s+deployed+prompts%2C+or+by+providing+completion+details+including+prompt+and+inputs+in+the+requ\u0026amp;theme=76f3f976f3374a923e121b3f\u0026amp;signature=cc8bb0eef4afb6d94d2602fb93a1ead55cbfdb8b04d8e449fbeac3a21b71d071\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/pareaai/gB2mc3qTsxvE_WBo/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Parea AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9563FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.parea.ai/api-reference/llm-proxy/stream-completion\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/llm-proxy/stream-completion.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.parea.ai/#organization\",\"name\":\"Parea AI\",\"url\":\"https://docs.parea.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/pareaai/3kurg3MZRrsWWk8t/logo/parea-light.png?fit=max\u0026auto=format\u0026n=3kurg3MZRrsWWk8t\u0026q=85\u0026s=c32fc81b38c3586ed7187a84b3e0c8d9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.parea.ai#website\",\"name\":\"Parea AI\",\"url\":\"https://docs.parea.ai\",\"publisher\":{\"@id\":\"https://docs.parea.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.parea.ai/api-reference/llm-proxy/stream-completion#webpage\",\"url\":\"https://docs.parea.ai/api-reference/llm-proxy/stream-completion\",\"name\":\"Stream Completion\",\"description\":\"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.\",\"dateModified\":\"2026-01-06T22:58:28.217Z\",\"isPartOf\":{\"@id\":\"https://docs.parea.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.parea.ai/api-reference/llm-proxy/stream-completion#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.parea.ai/api-reference/llm-proxy/stream-completion#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"LLM Proxy\",\"item\":\"https://docs.parea.ai/api-reference/llm-proxy/completion\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Stream Completion\",\"item\":\"https://docs.parea.ai/api-reference/llm-proxy/stream-completion\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.parea.ai/api-reference/llm-proxy/stream-completion#apireference\",\"headline\":\"Stream Completion\",\"name\":\"Stream Completion\",\"description\":\"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.\",\"url\":\"https://docs.parea.ai/api-reference/llm-proxy/stream-completion\",\"mainEntityOfPage\":{\"@id\":\"https://docs.parea.ai/api-reference/llm-proxy/stream-completion#webpage\"},\"dateModified\":\"2026-01-06T22:58:28.217Z\",\"publisher\":{\"@id\":\"https://docs.parea.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.parea.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Parea AI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Parea AI","nav":{"global":{"anchors":[{"anchor":"Github","href":"https://github.com/parea-ai/parea-sdk","icon":"github"},{"anchor":"Discord","href":"https://discord.gg/p7CUwSKJD6","icon":"discord"},{"anchor":"Chat with Founders","href":"https://calendly.com/parea-ai/chat","icon":"phone"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/welcome/what_is_parea_ai"}]},{"tab":"API Reference","groups":[{"group":"General","pages":[{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Create or get Project","openapi":"post /api/parea/v1/project","href":"/api-reference/general/create-or-get-project"},{"openapi":"get /api/parea/v1/","title":"Health Check","href":"/api-reference/general/health-check"}]},{"group":"Tracing","pages":[{"openapi":"post /api/parea/v1/trace_log","title":"Record Trace Log","href":"/api-reference/tracing/record-trace-log"},{"openapi":"post /api/parea/v1/feedback","title":"Record Feedback","href":"/api-reference/tracing/record-feedback"},{"openapi":"put /api/parea/v1/trace_log","title":"Update Trace Log","href":"/api-reference/tracing/update-trace-log"},{"title":"Get Trace Logs","openapi":"post /api/parea/v1/get_trace_logs","href":"/api-reference/tracing/get-trace-logs"},{"title":"Get Trace Log","openapi":"get /api/parea/v1/trace_log/{trace_id}","href":"/api-reference/tracing/get-trace-log"}]},{"group":"Experiments","pages":[{"title":"Create Experiment","openapi":"post /api/parea/v1/experiment","href":"/api-reference/experiments/create-experiment"},{"title":"Finish Experiment","openapi":"post /api/parea/v1/experiment/{experiment_uuid}/finished","href":"/api-reference/experiments/finish-experiment"},{"title":"Get Experiment Stats","openapi":"get /api/parea/v1/experiment/{experiment_uuid}/stats","href":"/api-reference/experiments/get-experiment-stats"},{"title":"Get Experiment Trace Logs","openapi":"post /api/parea/v1/experiment/{experiment_uuid}/trace_logs","href":"/api-reference/experiments/get-experiment-trace-logs"},{"title":"List Experiments","openapi":"post /api/parea/v1/experiments","href":"/api-reference/experiments/list-experiments"}]},{"group":"LLM Proxy","pages":[{"openapi":"post /api/parea/v1/completion","title":"Completion","description":"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.\nThis endpoint acts as a LLM gateway/proxy endpoint to generate completions from different LLMs.","href":"/api-reference/llm-proxy/completion"},{"openapi":"post /api/parea/v1/completion/stream","title":"Stream Completion","href":"/api-reference/llm-proxy/stream-completion"},{"openapi":"post /api/parea/v1/deployed-prompt","title":"Fetch Deployed Prompt","description":"Given a deployment_id, fetches the deployed prompt and its details. Can be optionally used to fill-in the templated prompt with provided inputs.","href":"/api-reference/llm-proxy/fetch-deployed-prompt"}]},{"group":"Datasets","pages":[{"openapi":"post /api/parea/v1/collection","title":"Create Collection","href":"/api-reference/datasets/create-collection"},{"openapi":"post /api/parea/v1/testcases","title":"Create Test Cases For Dataset","href":"/api-reference/datasets/create-test-cases-for-dataset"},{"openapi":"get /api/parea/v1/collection/{test_collection_identifier}","title":"Get Test Case Collection By Identifier","href":"/api-reference/datasets/get-test-case-collection-by-identifier"},{"openapi":"post /api/parea/v1/update_test_case/{dataset_id}/{test_case_id}","title":"Update Test Case","href":"/api-reference/datasets/update-test-case"}]},{"group":"SDK","pages":[{"title":"Python","href":"/api-reference/sdk/python"},{"title":"TypeScript","href":"/api-reference/sdk/typescript"}]}]},{"tab":"Blog","pages":[{"title":"Blog","href":"/blog/self-improving-domain-specific-alligned-llm-evals-with-human-judgement"}]}]},"title":"Stream Completion - Parea AI","buildId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","deploymentId":"dpl_2oYXwqkEXirXBPk8wV1FtM5USFWi","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-WRhTSUDL.js","utils-ChMov4Kr.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-_REmC2bI.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp6nVRCu.js","snippetPresets-DZadmXoU.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CY2WdoTl.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-DwYG-Q4l.js","shallow-BXQIGwv4.js","getApiPlaygroundDisplay-CK5nK5B9.js","CodeSnippet-TH4a2aGW.js","CodeSnippets-DwsQiOFS.js","Page-R3M_BF4L.js","getPastedJson-DD7kUzi_.js","icon-holE3QoJ.js","MethodPill-DUW0T8us.js","DuplicateIcon-CI_p4be-.js","createIcon-BdbRvavb.js","DynamicMarkdown-DN96a4Ur.js","SectionHeading-SCu36A9d.js","axios-vUo_bRtp.js","Markdown-CCeGv-zI.js","clsx-BGBGWFTt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-Cv_O2fky.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-2C5OB2eV.js"]}