OPENAI WORKFLOW · 03 / 10
Make your first OpenAI Responses API request
Send a small text request and display the generated answer in Python.
Documentation checked · Loomwell editorial guide · Examples have not been live API tested.
Steps
- Complete Python setup and authentication first. Choose a Responses-compatible model your project can access.
- Save this as first_response.py and run python first_response.py. This makes a billable OpenAI API request.
Example
Python · Python API examples require OPENAI_API_KEY and OPENAI_MODEL in your server environment. API calls may incur OpenAI charges.
import os
from openai import OpenAI
client = OpenAI()
response = client.responses.create(
model=os.environ["OPENAI_MODEL"],
input="Explain an HTTP request in one sentence.",
)
print(response.output_text)Check the result
Expect generated text rather than a fixed exact sentence. If the request fails, diagnose authentication or rate and billing errors before adding more application logic.
Official source
Check current provider documentation and model support before deployment. This guide is separate from the approved evidence records listed in the catalog.
Use Loomwell with your coding agent
Inspect the published record coverage before starting a trial or connecting MCP.