DataEyesAI
Official SiteConsoleDocs HomeGetting StartedDeveloper ToolsAI Models API
Terms & Policies
Official SiteConsoleDocs HomeGetting StartedDeveloper ToolsAI Models API
Terms & Policies
  1. AI Models API
  • API Overview
  • Chat Completions
  • Responses
  • Messages (Claude)
  • Gemini (generateContent)
  • Embeddings
  • Image Models
    • Images
    • Gemini Image Generation
    • Grok Imagine Image
  • Midjourney format
    • Midjourney API Reference
    • Task query interface
    • Upload image
    • Get seed (Seed)
    • Submit Imagine task
    • Query tasks based on ID list
    • FaceSwap
    • Execute Action operation
    • /mj/submit/blend
    • Submit Describe task
    • Submit Modal
    • Refresh link
    • Edit image
    • Query task status by task ID
    • Get the seed of the task image
  • Video Model
    • FLUX Video Generation (flux-3-video)
    • Grok Video Generation
      • 00-Overview
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Reference-to-Video
      • 04-Video-Editing
      • 05-Video-Extension
    • Seedance Video Generation
      • 00-Overview
      • 01-Create-Video-Generation-Task
      • 02-Query-Video-Generation-Task
      • 03-Query-Video-Generation-Task-List
      • 04-Cancel-or-Delete-Task
      • Seedance Private Asset Library API Documentation
    • MiniMax-H3 Video Generation
      • 00-Overview
      • 01-Create-Video-Generation
      • 02-Create-Video-Regeneration
      • 03-Create-H3-Context-IR
      • 04-Query-Task
      • 05-List-Tasks
      • 06-Cancel-or-Delete-Task
    • Hailuo Video Generation
      • 00-Overview
      • 01-Text-to-Video-T2V
      • 02-Image-to-Video-I2V
      • 03-First-Last-Frame-FL2V
      • 04-Subject-Reference-S2V
      • 05-Query-Task-Status
      • 06-Video-Download
      • 99-Appendix-Camera-Movement-and-Webhooks
    • Jimeng Video Generation
      • 00-Overview
      • 01-3.0-Pro-Video-Generation
      • 02-720P-Text-to-Video
      • 03-720P-Image-to-Video-First-Frame
      • 04-720P-Image-to-Video-Start-End-Frame
      • 05-720P-Image-to-Video-Camera
      • 06-1080P-Text-to-Video
      • 07-1080P-Image-to-Video-First-Frame
      • 08-1080P-Image-to-Video-Start-End-Frame
      • 09-Error-Codes
    • Kling AI Video Generation
      • 00-Overview
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Omni-Video
      • 04-Multi-Image-to-Video
      • 05-Motion-Control
      • 06-Multi-Elements
      • 07-Video-Extension
      • 08-Lip-Sync
      • 09-Avatar
      • 10-Text-to-Audio
      • 11-Video-to-Audio
      • 12-TTS
      • 13-Custom-Voices
      • 14-Image-Recognition
      • 15-Element-Management
      • 16-Video-Effects
      • 17-Kling-4.0-Video-Generation
    • Vidu Video Generation
      • 00-Overview
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Reference-to-Video
      • 04-Start-End-Frame
      • 05-Multi-Frame
      • 06-Scene-Template
      • 07-Template-Story
      • 08-Query-Tasks
    • HappyHorse
      • HappyHorse Text-to-Video
      • HappyHorse Image-to-Video (First Frame)
      • HappyHorse Reference-to-Video
      • HappyHorse Video Editing
    • Wan Video Generation
      • 00-Overview.md
      • 01-Text-to-Video
      • 02-Image-to-Video
      • 03-Reference-to-Video
      • 04-Video-Editing
      • 05-First-Last-Frame-to-Video
      • 06-Motion-Transfer-and-Character-Swap
      • 07-Digital-Human-Video
      • 08-VACE-Video-Editing
      • 09-Query-Task
  • Audio API
    • Audio API
    • Gemini TTS API
    • Google DeepMind Lyria API
    • Elevenlabs Speech to Text API Reference
  1. AI Models API

Responses

OpenAI's newer generation API, recommended for GPT models. Unlike Chat Completions, it lets you use reasoning and tools together and includes built-in web search. Codex uses this API too.
POST https://studio.dataeyes.ai/v1/responses

Quick example#

cURL
Python
Node.js
Response (excerpt):
{
  "id": "resp_xxx",
  "object": "response",
  "created_at": 1792856704,
  "status": "completed",
  "model": "gpt-6-luna",
  "output": [
    {
      "id": "msg_xxx",
      "type": "message",
      "role": "assistant",
      "status": "completed",
      "content": [
        {
          "type": "output_text",
          "text": "I’m ChatGPT, an AI assistant here to help answer questions and tackle tasks.",
          "annotations": []
        }
      ]
    }
  ],
  "usage": {
    "input_tokens": 22,
    "input_tokens_details": { "cached_tokens": 0 },
    "output_tokens": 21,
    "output_tokens_details": { "reasoning_tokens": 0 },
    "total_tokens": 43
  }
}
The model's reply is in the output array; the item with type message is the final answer. The SDK's output_text joins all text for you.

Request parameters#

ParameterTypeRequiredDescription
modelstringYesModel name, exactly as shown in the Model Hub
inputstring / arrayYesInput. A string is a single user message; an array can hold multi-turn messages, images and tool results
instructionsstringNoSystem instructions, equivalent to the system message in Chat Completions
streambooleanNoIf true, the response is streamed as SSE events
max_output_tokensintegerNoUpper limit on output tokens (including reasoning tokens)
reasoningobjectNoReasoning settings, such as {"effort": "low"}. See "Reasoning" below
toolsarrayNoAvailable tools: custom functions (function) and web search (web_search)
tool_choicestring / objectNoauto (default), none, required, or a specific tool
For multi-turn conversations, put the history in the input array in order, for example:
"input": [
  {"role": "user", "content": "My name is Li."},
  {"role": "assistant", "content": "Hi, Li!"},
  {"role": "user", "content": "What is my name?"}
]

Streaming#

With "stream": true, the response is returned as an event stream. Text deltas arrive in response.output_text.delta events, and response.completed (with the full response and usage) comes last.
Event order:
response.created → response.in_progress → response.output_item.added → response.content_part.added
→ response.output_text.delta (repeated) → response.output_text.done → response.content_part.done
→ response.output_item.done → response.completed
event: response.output_text.delta
data: {"type":"response.output_text.delta","item_id":"msg_xxx","output_index":0,"content_index":0,"delta":"…"}
Python SDK example:

Reasoning#

Use reasoning.effort to control how much the model thinks (low, medium, high).
output starts with a reasoning item, followed by the final answer. Reasoning tokens are reported in usage.output_tokens_details.reasoning_tokens and billed as output:
{
  "output": [
    { "id": "rs_xxx", "type": "reasoning", "summary": [] },
    {
      "id": "msg_xxx",
      "type": "message",
      "role": "assistant",
      "content": [{ "type": "output_text", "text": "30" }]
    }
  ],
  "usage": {
    "input_tokens": 27,
    "output_tokens": 15,
    "output_tokens_details": { "reasoning_tokens": 8 },
    "total_tokens": 42
  }
}

Function calling#

Unlike Chat Completions, function definitions in Responses are flat (name and parameters sit directly on the tool object), and they can be used together with reasoning.
Step 1: send the request with function definitions
output contains a function_call item:
{
  "output": [
    {
      "id": "fc_xxx",
      "type": "function_call",
      "status": "completed",
      "call_id": "call_TRQB8qM768eHrdYYwTDvBt06",
      "name": "get_weather",
      "arguments": "{\"city\":\"Shanghai\"}"
    }
  ]
}
Step 2: run the function and send the result back
Put the original question, the function_call item and a function_call_output item (with the matching call_id) in input:
The model answers: Shanghai is cloudy today, with a temperature of 22°C (72°F).

Web search#

Add {"type": "web_search"} to tools. The model decides what to search for, reads pages, and cites its sources in the answer.
output contains one or more web_search_call items (searching or opening pages) followed by the final message. Sources are in annotations:
{
  "output": [
    {
      "id": "ws_xxx",
      "type": "web_search_call",
      "status": "completed",
      "action": { "type": "search", "queries": ["AI industry news October 24 2026 artificial intelligence today"] }
    },
    {
      "id": "msg_xxx",
      "type": "message",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "…",
          "annotations": [
            {
              "type": "url_citation",
              "start_index": 203,
              "end_index": 289,
              "title": "…",
              "url": "https://www.axios.com/…"
            }
          ]
        }
      ]
    }
  ]
}
Latency and usage
Web search usually takes tens of seconds, so set a long enough client timeout. Retrieved page content counts as input tokens; a single request can reach tens of thousands of input tokens.

Image input#

Use input_image in a message's content:
image_url can also be a Base64 data URL (data:image/jpeg;base64,...).

Response fields#

FieldDescription
idUnique ID of the response
statuscompleted, incomplete (for example, the token limit was reached), or failed
outputArray of output items; type can be message, reasoning, function_call or web_search_call
output[].content[].textAnswer text (in message items)
output[].content[].annotationsCited sources (with web search)
usage.input_tokensInput tokens; input_tokens_details.cached_tokens is the cached part
usage.output_tokensOutput tokens (including reasoning tokens)
usage.output_tokens_details.reasoning_tokensReasoning tokens

FAQ#

Responses or Chat Completions?
Web search requests time out
404 or Invalid URL
Previous
Chat Completions
Next
Messages (Claude)