Skip to content
masterclass Buddy

AI & ML · Concept

GPT

Use the Responses API to send a prompt to a GPT model and generate text. The result can be text, code, JSON, equations, or other output items.

Last updated

Syntax

client.responses.create({ model: "gpt-6-astra", input: "your prompt" })

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

Subscribe
  • Responses API
  • output_text
  • response.output
  • Function calling
  • Structured output

Source: Text generation | OpenAI API. Checked 2026-11-03.