The o3-deep-research model is designed for advanced research tasks. It can browse, analyze, and synthesize information from hundreds of sources to produce a comprehensive, citation-rich report. This model uses multi-step reasoning, web search, and remote Model Context Protocol (MCP) servers to gather and process data. It can also run code for complex analysis.Use deep research when you need:
Legal or scientific research
Market and competitive analysis
Reports based on large sets of internal or public data
To start, call the Responses API with the model set to your o3-deep-research deployment name. Include at least one data source: web search or a remote MCP server. Optionally, add the code interpreter tool for advanced analysis.
Replace o3-deep-research with your model deployment name.
Copy
Ask AI
curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/responses \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AZURE_OPENAI_AUTH_TOKEN" \ -d '{ "model": "o3-deep-research", "background": true, "tools": [ { "type": "web_search_preview" }, { "type": "code_interpreter", "container": {"type": "auto"} } ], "input": "Research the economic impact of semaglutide on global healthcare systems. Include specific figures, trends, statistics, and measurable outcomes. Prioritize reliable, up-to-date sources: peer-reviewed research, health organizations (e.g., WHO, CDC), regulatory agencies, or pharmaceutical earnings reports. Include inline citations and return all source metadata. Be analytical, avoid generalities, and ensure that each section supports data-backed reasoning that could inform healthcare policy or financial modeling." }'
Copy
Ask AI
import osfrom openai import OpenAIclient = OpenAI( base_url = "https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/", api_key=os.getenv("AZURE_OPENAI_API_KEY") )input_text = """Research the economic impact of semaglutide on global healthcare systems.Do:- Include specific figures, trends, statistics, and measurable outcomes.- Prioritize reliable, up-to-date sources: peer-reviewed research, health organizations (e.g., WHO, CDC), regulatory agencies, or pharmaceutical earnings reports.- Include inline citations and return all source metadata.Be analytical, avoid generalities, and ensure that each section supportsdata-backed reasoning that could inform healthcare policy or financial modeling."""response = client.responses.create( model="o3-deep-research", # Replace with your model deployment name. input=input_text, background=True, tools=[ { "type": "web_search_preview" }, { "type": "code_interpreter", "container": {"type": "auto"} } ],)print(response.output_text)
Deep research requests can take time. Run them in background mode and configure a webhook to receive notifications when the task completes.
Deep research responses follow the standard Responses API format. Pay attention to the output array—it lists all tool calls made during the process, such as:
web_search_call: Actions using the web search tool (for example, search, open_page, find_in_page).
code_interpreter_call: Code execution steps.
mcp_tool_call: Actions performed on remote MCP servers.
message: The model’s final answer with inline citations.
Example web_search_call (search action):
Copy
Ask AI
{ "id": "ws_0caf37305fe587b600690a7050f1008196804b303b95135978", "action": { "query": "positive news story November 4 2025 good news", "type": "search", "sources": null }, "status": "completed", "type": "web_search_call"}
Example message (final answer):
Copy
Ask AI
{ "id": "msg_0caf37305fe587b600690a70bbd9948196916fd9037096ba88", "content": [ { "annotations": [ { "end_index": 564, "start_index": 333, "title": "The world of AI", "type": "url_citation", "url": "https://foo.bar.com" } ], "text": "... answer to the query with inline citations ....", "type": "output_text", "logprobs": [] } ], "role": "assistant", "status": "completed", "type": "message"}
curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/responses \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AZURE_OPENAI_AUTH_TOKEN" \ -d '{ "model": "gpt-4.1", "input": "Research surfboards for me. I'm interested in ...", "instructions": "You are talking to a user who is asking for a research task to be conducted. Your job is to gather more information from the user to successfully complete the task. GUIDELINES: - Be concise while gathering all necessary information** - Make sure to gather all the information needed to carry out the research task in a concise, well-structured manner. - Use bullet points or numbered lists if appropriate for clarity. - Don't ask for unnecessary information, or information that the user has already provided. IMPORTANT: Do NOT conduct any research yourself, just gather information that will be given to a researcher to conduct the research task." }'
Copy
Ask AI
import osfrom openai import OpenAIclient = OpenAI( base_url = "https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/", api_key=os.getenv("AZURE_OPENAI_API_KEY") )instructions = """You are talking to a user who is asking for a research task to be conducted. Your job is to gather more information from the user to successfully complete the task.GUIDELINES:- Be concise while gathering all necessary information**- Make sure to gather all the information needed to carry out the research task in a concise, well-structured manner.- Use bullet points or numbered lists if appropriate for clarity.- Don't ask for unnecessary information, or information that the user has already provided.IMPORTANT: Do NOT conduct any research yourself, just gather information that will be given to a researcher to conduct the research task."""input_text = "Research surfboards for me. I'm interested in ..."response = client.responses.create( model="gpt-4.1", input=input_text, instructions=instructions,)print(response.output_text)
curl https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/responses?api-version=preview \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AZURE_OPENAI_AUTH_TOKEN" \ -d '{ "model": "gpt-4.1", "input": "Research surfboards for me. I'm interested in ...", "instructions": "You will be given a research task by a user. Your job is to produce a set of instructions for a researcher that will complete the task. Do NOT complete the task yourself, just provide instructions on how to complete it. GUIDELINES: 1. **Maximize Specificity and Detail** - Include all known user preferences and explicitly list key attributes or dimensions to consider. - It is of utmost importance that all details from the user are included in the instructions. 2. **Fill in Unstated But Necessary Dimensions as Open-Ended** - If certain attributes are essential for a meaningful output but the user has not provided them, explicitly state that they are open-ended or default to no specific constraint. 3. **Avoid Unwarranted Assumptions** - If the user has not provided a particular detail, do not invent one. - Instead, state the lack of specification and guide the researcher to treat it as flexible or accept all possible options. 4. **Use the First Person** - Phrase the request from the perspective of the user. 5. **Tables** - If you determine that including a table will help illustrate, organize, or enhance the information in the research output, you must explicitly request that the researcher provide them. Examples: - Product Comparison (Consumer): When comparing different smartphone models, request a table listing each model's features, price, and consumer ratings side-by-side. - Project Tracking (Work): When outlining project deliverables, create a table showing tasks, deadlines, responsible team members, and status updates. - Budget Planning (Consumer): When creating a personal or household budget, request a table detailing income sources, monthly expenses, and savings goals. - Competitor Analysis (Work): When evaluating competitor products, request a table with key metrics, such as market share, pricing, and main differentiators. 6. **Headers and Formatting** - You should include the expected output format in the prompt. - If the user is asking for content that would be best returned in a structured format (e.g. a report, plan, etc.), ask the researcher to format as a report with the appropriate headers and formatting that ensures clarity and structure. 7. **Language** - If the user input is in a language other than English, tell the researcher to respond in this language, unless the user query explicitly asks for the response in a different language. 8. **Sources** - If specific sources should be prioritized, specify them in the prompt. - For product and travel research, prefer linking directly to official or primary websites (e.g., official brand sites, manufacturer pages, or reputable e-commerce platforms like Amazon for user reviews) rather than aggregator sites or SEO-heavy blogs. - For academic or scientific queries, prefer linking directly to the original paper or official journal publication rather than survey papers or secondary summaries. - If the query is in a specific language, prioritize sources published in that language." }'
Copy
Ask AI
import osfrom openai import OpenAIclient = OpenAI( base_url = "https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/", api_key=os.getenv("AZURE_OPENAI_API_KEY") )instructions = """You will be given a research task by a user. Your job is to produce a set ofinstructions for a researcher that will complete the task. Do NOT complete thetask yourself, just provide instructions on how to complete it.GUIDELINES:1. **Maximize Specificity and Detail**- Include all known user preferences and explicitly list key attributes or dimensions to consider.- It is of utmost importance that all details from the user are included in the instructions.2. **Fill in Unstated But Necessary Dimensions as Open-Ended**- If certain attributes are essential for a meaningful output but the user has not provided them, explicitly state that they are open-ended or default to no specific constraint.3. **Avoid Unwarranted Assumptions**- If the user has not provided a particular detail, do not invent one.- Instead, state the lack of specification and guide the researcher to treat it as flexible or accept all possible options.4. **Use the First Person**- Phrase the request from the perspective of the user.5. **Tables**- If you determine that including a table will help illustrate, organize, or enhance the information in the research output, you must explicitly request that the researcher provide them.Examples:- Product Comparison (Consumer): When comparing different smartphone models, request a table listing each model's features, price, and consumer ratings side-by-side.- Project Tracking (Work): When outlining project deliverables, create a table showing tasks, deadlines, responsible team members, and status updates.- Budget Planning (Consumer): When creating a personal or household budget, request a table detailing income sources, monthly expenses, and savings goals.- Competitor Analysis (Work): When evaluating competitor products, request a table with key metrics, such as market share, pricing, and main differentiators.6. **Headers and Formatting**- You should include the expected output format in the prompt.- If the user is asking for content that would be best returned in a structured format (e.g. a report, plan, etc.), ask the researcher to format as a report with the appropriate headers and formatting that ensures clarity and structure.7. **Language**- If the user input is in a language other than English, tell the researcher to respond in this language, unless the user query explicitly asks for the response in a different language.8. **Sources**- If specific sources should be prioritized, specify them in the prompt.- For product and travel research, prefer linking directly to official or primary websites (e.g., official brand sites, manufacturer pages, or reputable e-commerce platforms like Amazon for user reviews) rather than aggregator sites or SEO-heavy blogs.- For academic or scientific queries, prefer linking directly to the original paper or official journal publication rather than survey papers or secondary summaries.- If the query is in a specific language, prioritize sources published in that language."""input_text = "Research surfboards for me. I'm interested in ..."response = client.responses.create( model="gpt-4.1", input=input_text, instructions=instructions,)print(response.output_text)