Chat Completion
Generates a chat completion response using the specified model. Requires sufficient user credits and valid model.
Authorizations
AuthorizationstringRequired
Enter your API key or JWT with the 'Bearer ' prefix
Body
modelstringRequired
ID of the model to use for completion
streambooleanOptionalDefault:
Whether to stream back partial progress
falsetemperaturenumber Β· floatOptionalDefault:
What sampling temperature to use, between 0 and 2
1top_pnumber Β· floatOptionalDefault:
An alternative to sampling with temperature, called nucleus sampling
1max_tokensintegerOptional
The maximum number of tokens to generate in the completion
seedintegerOptional
Seed for deterministic results
max_completion_tokensintegerOptional
Maximum number of completion tokens
frequency_penaltynumber Β· floatOptionalDefault:
Number between -2.0 and 2.0 to penalize repeated tokens
0presence_penaltynumber Β· floatOptionalDefault:
Number between -2.0 and 2.0 to penalize tokens already present in the text
0Responses
200
Successfully generated completion
application/json
402
Insufficient credits
application/json
403
Model access forbidden
application/json
404
Model not found
application/json
post
/api/chat/completionsLast updated