Responses API vs Chat Completions

Two powerful APIs for AI generation. Understand the differences and choose the right one for your use case.

RECOMMENDED

Responses API

Stateful, agentic workflows

vs
STABLE

Chat Completions

Stateless, simple requests

Feature Comparison

Feature Responses API Chat Completions
State Management Built-in conversation state Stateless, manage yourself
Tool Use Native, multi-turn Function calling
File Handling Built-in file attachments Base64 encoding only
Streaming Server-Sent Events Server-Sent Events
Context Caching Automatic Manual
Web Search Built-in tool Not available
Code Interpreter Built-in Use Assistants API
Computer Use Supported Not available
OpenAI Compatible New format Drop-in replacement

Code Examples

Responses API
# Stateful conversation response = client.responses.create( model="mythic-4", input="Analyze this data", tools=[{"type": "code_interpreter"}], attachments=[ {"file_id": file.id} ] ) # Continue conversation response2 = client.responses.create( model="mythic-4", input="Now create a chart", previous_response_id=response.id )
Chat Completions
# Stateless, pass full history messages = [ {"role": "system", "content": "..."}, {"role": "user", "content": "Hello"} ] response = client.chat.completions.create( model="mythic-4", messages=messages ) # Continue - append manually messages.append(response.choices[0].message) messages.append({"role": "user", ...})

When to Use Each

🚀 Use Responses API when:

  • Building conversational agents
  • Using tools like code interpreter
  • Handling file attachments
  • Need web search capabilities
  • Building multi-turn workflows
  • Want automatic state management

📝 Use Chat Completions when:

  • Simple, one-off generations
  • Need OpenAI API compatibility
  • Migrating from existing code
  • Custom state management required
  • Using with existing SDKs
  • Batch processing pipelines

💡 Recommendation

For new projects, we recommend starting with the Responses API. It's more powerful, handles state for you, and includes built-in tools. Use Chat Completions if you need OpenAI compatibility or have existing integrations.

Get Started

Explore the full documentation for each API.

Responses API → Chat Completions →