Langfuse just got faster →
← Back to changelog
March 17, 2025

OpenAI Response API support in SDKs

Picture Hassieb PakzadHassieb Pakzad

Trace your OpenAI Response API calls with our Python and JS SDKs

OpenAI has released their new improved Response API for a better developer experience building agentic applications. We have added support for tracing OpenAI Response API executions in the OpenAI integrations in both our JS and Python SDK.

from langfuse.openai import openai
from langfuse import get_client

client = openai.OpenAI()

client.responses.create(
    model="gpt-4o",
    input="Tell me a three sentence bedtime story about a unicorn.",
)

# Flush via global client
langfuse = get_client()
langfuse.flush()
import { observeOpenAI } from "../langfuse";

const client = observeOpenAI(openai);

const response = await client.responses.create({
  model: "gpt-4o",
  input: "Tell me a three sentence bedtime story about a unicorn.",
});

await client.flushAsync();

Releases

Learn more


Was this page helpful?