Search...
/
Contact us
Join our Discord
Home
Guides and concepts
API Reference
SDK Docs
Home
Guides and concepts
API Reference
SDK Docs
API Reference
GET
Check API Health
GET
List Chat Models
POST
Chat Completions
POST
Chat Completions Streaming
POST
Chat Completions Vision
GET
List Completions Models
POST
Completions
GET
List Embeddings Models
POST
Embeddings
POST
Factuality
POST
Injection
POST
Replace Personal Information
POST
Toxicity
POST
Translate
SDK Reference
Chat
Chat SSE (Streaming)
Chat Vision
Completions
Embeddings
Factuality
Injection
PII
Toxicity
Translate
Contact us
Join our Discord
API Reference
Chat Completions Streaming
POST
https://
api.predictionguard.com
/
chat
/
completions - Streaming Version
Generate chat completions based on a conversation history with streaming support.
Request
This endpoint expects an object.
model
string
Required
The chat model to use for generating completions.
messages
list of objects
Required
An array of messages used for generating completions.
Show 2 properties
max_tokens
integer
Optional
The maximum number of tokens in the generated completion.
temperature
double
Optional
The temperature parameter for controlling randomness in completions.
top_p
double
Optional
The diversity of the generated text based on nucleus sampling.
top_k
integer
Optional
The diversity of the generated text based on top-k sampling.
stream
boolean
Optional
Turn streaming on.
input
object
Optional
Options to affect the input of the request.
Show 3 properties
Response
This endpoint returns a list of objects.
data
object
Optional
Show 5 properties
Errors
400
Bad Request
403
Forbidden
Built with