Endpoint Examples
Completions
Creates a completion for the provided prompt
POST
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Parameters for text completion
The model to use for completion
The text prompt to complete
Maximum number of tokens to generate
Controls randomness (0-2)
Nucleus sampling parameter (0-1)
Whether to stream the response
Up to 4 sequences where the API will stop generating
Penalty for frequency of tokens (-2 to 2)
Penalty for presence of tokens (-2 to 2)
Response
200
application/json
Text completion response
Unique identifier for the completion
Object type, always 'text_completion'
Unix timestamp of when the completion was created
Model used for completion
Array of completion choices