openai_create_response
Create AI responses using OpenAI's Responses API with support for model variants, background tasks, and search preview. Accepts conversation input and returns output with usage data.
Instructions
Create a response using the OpenAI Responses API via AceDataCloud.
The Responses API is an alternative to the Chat Completions API with support
for a wider range of model variants and additional features like background processing.
Use this when:
- You need access to model-specific dated variants (e.g., o3-2025-04-16)
- You want background processing with a task ID
- You need access to search-preview models
Returns:
JSON response containing the model's output and usage information.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of response choices to generate. Default is 1. | |
| input | Yes | A list of messages comprising the conversation. Each message must have a 'role' ('system', 'user', or 'assistant') and 'content' field. Example: [{'role': 'user', 'content': 'Explain quantum computing'}] | |
| model | No | The model to use. Supports a wide range of GPT-4, GPT-4o, GPT-5, and o-series models including their dated variants. Default is gpt-4.1. | gpt-4.1 |
| background | No | Whether to run the model response in the background. When True, returns immediately with a task ID. | |
| max_tokens | No | The maximum number of tokens to generate in the response. If not specified, the model uses its default limit. | |
| temperature | No | Sampling temperature between 0 and 2. Higher values produce more creative output; lower values produce more deterministic output. Default is 1. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |