OpenAI Responses API
POST
/v1/responses
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.mirapi.ai/v1/responses"
payload := strings.NewReader("{ \"model\": \"example\", \"input\": [ {} ], \"instructions\": \"example\", \"max_output_tokens\": 1, \"temperature\": 1, \"top_p\": 1, \"stream\": true, \"tools\": [ {} ], \"tool_choice\": {}, \"reasoning\": { \"effort\": \"low\", \"summary\": \"example\" }, \"previous_response_id\": \"example\", \"truncation\": \"auto\" }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://api.mirapi.ai/v1/responses';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"model":"example","input":[{}],"instructions":"example","max_output_tokens":1,"temperature":1,"top_p":1,"stream":true,"tools":[{}],"tool_choice":{},"reasoning":{"effort":"low","summary":"example"},"previous_response_id":"example","truncation":"auto"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.mirapi.ai/v1/responses \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "example", "input": [ {} ], "instructions": "example", "max_output_tokens": 1, "temperature": 1, "top_p": 1, "stream": true, "tools": [ {} ], "tool_choice": {}, "reasoning": { "effort": "low", "summary": "example" }, "previous_response_id": "example", "truncation": "auto" }'The OpenAI Responses API, used to create model responses. Supports multi-turn conversations, tool calls, reasoning and more.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
model
required
string
input
One of:
string
Array<object>
object
instructions
string
max_output_tokens
integer
temperature
number
top_p
number
stream
boolean
tools
Array<object>
object
reasoning
object
effort
string
summary
string
previous_response_id
string
truncation
string
Responses
Section titled “Responses”Response created
Media typeapplication/json
object
id
string
object
string
created_at
integer
status
string
model
string
output
Array<object>
object
type
string
id
string
status
string
role
string
content
Array<object>
object
type
string
text
string
usage
object
prompt_tokens
Prompt tokens
integer
completion_tokens
Completion tokens
integer
total_tokens
Total tokens
integer
prompt_tokens_details
object
cached_tokens
integer
text_tokens
integer
audio_tokens
integer
image_tokens
integer
completion_tokens_details
object
text_tokens
integer
audio_tokens
integer
reasoning_tokens
integer
Example
{ "object": "response", "status": "completed"}