Create a Text Completion
Create a Text Completion
Request
This endpoint expects an object.
model
Model identifier or alias.
prompt
Legacy completion prompt in Human/Assistant format.
max_tokens_to_sample
Maximum number of tokens to sample.
metadata
Metadata object for request attribution.
stop_sequences
Stop generation if any sequence is encountered.
stream
Whether to stream the response.
temperature
Sampling temperature between 0 and 1.
top_k
Top-k sampling parameter.
top_p
Top-p sampling parameter.
Response
This endpoint returns an object.
id
Completion identifier
type
Object type. Always "completion".
completion
Generated completion text.
model
Resolved model identifier.
stop_reason
Reason the generation stopped.
Errors
401
Unauthorized
422
Unprocessable Entity

