completion

abstract suspend fun completion(request: CompletionRequest): TextCompletion

Deprecated

Legacy API; prefer Responses or Chat Completions for new integrations.

This is the main endpoint of the API. Returns the predicted completion for the given prompt, and can also return the probabilities of alternative tokens at each position if requested.