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

Chat Completions

The OpenAI-compatible chat endpoint. Text models from GPT, Claude, Gemini, DeepSeek, Qwen, Kimi, GLM, Grok and others can all be called through it. To switch models, change model.
POST https://studio.dataeyes.ai/v1/chat/completions

Quick example#

cURL
Python
Node.js
Response:
{
  "id": "chatcmpl-xxx",
  "object": "chat.completion",
  "created": 1792856685,
  "model": "gpt-6-luna",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "I’m ChatGPT, an AI assistant here to help with questions, ideas, and tasks."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 22,
    "completion_tokens": 22,
    "total_tokens": 44,
    "prompt_tokens_details": { "cached_tokens": 0 },
    "completion_tokens_details": { "reasoning_tokens": 0 }
  }
}

Request parameters#

ParameterTypeRequiredDescription
modelstringYesModel name, exactly as shown in the Model Hub
messagesarrayYesConversation messages in chronological order. See "Message format" below
streambooleanNoIf true, the response is streamed as SSE. Defaults to false
stream_optionsobjectNoWhen streaming, pass {"include_usage": true} to get usage in the last chunk
max_completion_tokensintegerNoUpper limit on generated tokens (includes reasoning tokens for reasoning models). The older max_tokens still works
temperaturenumberNoSampling temperature, 0 to 2. Lower is more deterministic
top_pnumberNoNucleus sampling. Adjust either this or temperature, not both
toolsarrayNoFunctions the model can call. See "Tool calling" below
tool_choicestring / objectNoauto (default), none, required, or a specific function
response_formatobjectNoStructured output. See "Structured output" below
reasoning_effortstringNoReasoning effort for GPT reasoning models: none, low, medium, high
Other standard OpenAI parameters (such as stop, seed, presence_penalty) are passed to the model as-is. Whether they take effect depends on the model.

Message format#

rolePurpose
systemSystem instructions that set the assistant's role and rules. Put it first
userUser input. content can be a string or an array of text and image parts
assistantEarlier model replies, for multi-turn conversations. Contains tool_calls when calling tools
toolA tool result. Must include the matching tool_call_id
The endpoint does not store context. For multi-turn conversations, send the full history in messages, in order.

Streaming#

With "stream": true, the response arrives as data: {...} chunks and ends with data: [DONE].
cURL
Python
Chunks (excerpt):
data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","model":"gpt-6-luna","choices":[{"index":0,"delta":{"content":"Hello"},"finish_reason":null}]}

data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","model":"gpt-6-luna","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}

data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","model":"gpt-6-luna","choices":[],"usage":{"prompt_tokens":11,"completion_tokens":13,"total_tokens":24}}

data: [DONE]

Image input#

Add an image_url part to the content array of a user message. Both public image URLs and Base64 data URLs are supported.
Image URL
Local image (Base64)
The description is returned in choices[0].message.content.
Image URL download failed
With a URL, the model service downloads the image. If you get invalid_image_url (download timed out or the URL is unreachable), send the image as Base64 or use a faster image host.

Tool calling#

Tool calling takes two steps: the model first returns the function to call and its arguments; you run it locally and send the result back; the model then writes the final answer.
GPT-6 models with tools on this endpoint
To use tools with GPT-6 models on Chat Completions, you must set "reasoning_effort": "none". Otherwise you get a 400 error: Function tools with reasoning_effort are not supported. To use reasoning and tools together, use the Responses API. Other models (Claude, DeepSeek, etc.) do not have this restriction.
Step 1: send the request with tool definitions
The model returns tool_calls, and finish_reason is tool_calls:
{
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": null,
        "tool_calls": [
          {
            "id": "call_WLnVRiDAiBglxwNgeeelq3gw",
            "type": "function",
            "function": { "name": "get_weather", "arguments": "{\"city\":\"Shanghai\"}" }
          }
        ]
      },
      "finish_reason": "tool_calls"
    }
  ]
}
Step 2: run the function and send the result back
Append the model's assistant message and a message with role tool to messages:
The model answers: Shanghai is cloudy today, with a temperature of about 22°C.
Full Python example

Structured output#

Pass a JSON Schema in response_format, and the model returns a JSON string that strictly matches it.
content in the response:
"{\"age\":28,\"city\":\"Seattle\",\"job\":\"product manager\",\"name\":\"John Smith\"}"

Reasoning models#

GPT reasoning models use reasoning_effort to control how much they think. Higher effort gives more thorough answers but takes longer and uses more tokens. Reasoning tokens are reported in usage.completion_tokens_details.reasoning_tokens and billed as output.
DeepSeek and some other models also return their reasoning in message.reasoning_content, with the final answer in content.

Calling other models#

Claude, Gemini and other models also work on this endpoint with the same request format:
For Claude-native features such as extended thinking and prompt caching, use the Messages API. For Gemini search, code execution and other native tools, see the Gemini API.

Response fields#

FieldDescription
idUnique ID of the request
modelThe model that produced the response
choices[].message.contentThe model's text reply
choices[].message.tool_callsFunctions the model wants to call (tool calling only)
choices[].finish_reasonWhy generation stopped: stop normal end, length token limit reached, tool_calls a tool needs to be called
usage.prompt_tokensInput tokens
usage.completion_tokensOutput tokens (including reasoning tokens)
usage.prompt_tokens_details.cached_tokensInput tokens served from cache
usage.completion_tokens_details.reasoning_tokensReasoning tokens

FAQ#

The answer is cut off and finish_reason is length
GPT-6 with tools returns 400
Image request returns invalid_image_url
404 or Invalid URL
Previous
API Overview
Next
Responses