OpenAI

How can I use the Chat Completion API?

Learn how to get started with the OpenAI Chat Completions API

Updated: 5/21/2025

As of May 21 2025, we’ve added new built-in tools to the Responses API—remote MCP servers, Image Generation, Code Interpreter, and an upgraded File Search—along with background mode and encrypted content, so you can build agents that pull richer context and run more reliably. For details, see our Responses API docs.

Please visit our developer text generation guide for details for how to use the Chat Completions API. If you want to get started with your first API request to the Chat Completions API, head to our developer quickstart.

Please find the comparison between capabilities supported in the Responses API and Completions API here. We recommend using Responses API, unless is it lacking capabilities that Completions API offers.

Does OpenAI store the data that is passed into the API?

As of March 1st, 2023, we retain customer API data for 30 days but no longer use customer data sent via the API to improve our models. You can learn more about our Enterprise privacy page.

How do I keep the Chat session focused on a topic?

The main way to keep the conversation focused on a topic is the developer instructions. You can learn more about the ways to steer the session topic under message role and instruction following.

What's the rate limits for the Chat Completions API?

The rate limit for the Chat Completions API depends on what model you are using. Head to our rate limits guide or your limits page for details on the limits.

Was this article helpful?