Skip to content
masterclass Buddy

AI & ML · Function

chat.completions

The Completions API is a legacy text-generation endpoint. It takes a single prompt string, but the documentation recommends using the Responses API or Chat Completions for current models.

Last updated

Syntax

POST /v1/completions

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Responses API
  • Chat Completions
  • prompt
  • max_tokens
  • finish_reason
  • stop
  • n
  • best_of

Source: Completions API | OpenAI API. Checked 2026-11-03.