Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation
Theme

Completions

Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position.

Create completion
completions.create(**kwargs) -> Completion
POST
/completions
Models
class Completion: …

Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).

class CompletionChoice: …
class CompletionUsage: …

Usage statistics for the completion request.