# Getting Started with OpenAI's Predicted Outputs for Faster LLM Responses

![Getting Started with OpenAI's Predicted Outputs for Faster LLM Responses image](https://www.firecrawl.dev/images/blog/openai-predicted-outputs.jpg)

Leveraging the full potential of Large Language Models (LLMs) often involves balancing between response accuracy and latency. OpenAI’s new Predicted Outputs feature introduces a way to significantly reduce response times by informing the model about the expected output in advance.

In this article, we’ll explore how to use Predicted Outputs with the GPT-4o and GPT-4o-mini models to make your AI applications super fast 🚀. We’ll also provide a practical example of transforming blog posts into SEO-optimized content, a powerful use case enabled by this feature.

### What Are Predicted Outputs?

Predicted Outputs allow you to provide the LLM with an anticipated output, especially useful when most of the response is known ahead of time. For tasks like rewriting text with minor modifications, this can drastically reduce the time it takes for the model to generate the desired result.

### Why Use Predicted Outputs?

By supplying the model with a prediction of the output, you:

- **Reduce Latency:** The model can process and generate responses faster because it doesn’t need to generate the entire output from scratch.
- **Enhance Efficiency:** Useful when you can reasonably assume that large portions of the output will remain unchanged.

### Limitations to Keep in Mind

While Predicted Outputs are powerful, there are some limitations:

- Supported only with **GPT-4o** and **GPT-4o-mini** models.
- Certain API parameters are not supported, such as `n` values greater than 1, `logprobs`, `presence_penalty` greater than 0, among others.

### How to Use Predicted Outputs

Let’s dive into how you can implement Predicted Outputs in your application. We’ll walk through an example where we optimize a blog post by adding internal links to relevant pages within the same website.

#### Prerequisites

Make sure you have the following installed:

```bash
pip install firecrawl-py openai

```

#### Step 1: Set Up Your Environment

Initialize the necessary libraries and load your API keys.

```python
import os
import json
from firecrawl import FirecrawlApp
from dotenv import load_dotenv
from openai import OpenAI