1. gemini-3.1-pro-preview
Nexconn-AI
  • Nexconn LLM API Service
  • Quick Start
  • Key Concepts and Terminology
  • Try Nexconn Large Model API Online
  • How to Get API-KEY
  • FAQ
  • Model
    • Model List
      GET
  • Chat
    • Bypass Interface
      • Bypass Anthropic Protocol
      • bypass Vertex/Gemini protocol
      • bypass Responses protocol
    • gemini-3.1-pro-preview
      • gemini-3.1-pro-preview reasoning
        POST
      • gemini-3.1-pro-preview qfile
        POST
    • gemini-2.5-pro
      • gemini-2.5-pro reasoning
    • openai/gpt-5
      • openai/gpt-5 reasoning
    • openai/gpt-5.2
      • openai/gpt-5.2 Reasoning
    • openai/gpt-5.2-codex
      • openai/gpt-5.2-codex
    • gemini-2.5-flash
      • gemini-2.5-flash Reasoning
    • claude-4.5-sonnet
      • claude-4.5-sonnet reasoning
    • claude-4.6-opus
      • claude-4.6-opus reasoning
    • deepseek/deepseek-v3.2-251201
      • deepseek/deepseek-v3.2-251201 reasoning
    • deepseek-v3
      • Chat
    • claude-3.7-sonnet
      • Chat completion
    • doubao-seed-1.6
      • doubao-seed-1.6
    • qwen3-max-2026-01-23
      • Chat completion
    • moonshotai/kimi-k2.5
      • Chat completion
    • Chat completion
      POST
    • Anthropic Protocol
      POST
  • Video
    • Veo
      • Create Video Generation Task
      • Query Video Generation Task
    • sora-2
      • Create Video Generation Task
      • Query Video Generation Status
      • Video Remix
    • sora-2-pro
      • Create Video Generation Task
      • Query Video Generation Status
      • Video Remix
    • kling-v2-1
      • Create Video Task
      • Query Video Generation Status
    • kling-v2-5-turbo
      • Create Video Task
      • Query Video Generation Status
    • kling-v2-6
      • Create Video Task
      • Query Video Generation Status
    • kling-v3
      • Create Video Task
      • Query Video Generation Status
    • kling-video-o1
      • Create Video Task
      • Query Video Generation Status
    • kling-v3-omni
      • Create Video Task
      • Query Video Generation Status
    • bytedance/doubao-seedance-2-0-260128
      • Create Video Generation Task
      • Query Video Generation Task
    • vidu
      • viduq1
        • Create text-to-video task
        • Create reference to video task - Non-subject invocation (video generation)
        • Create reference to video task - Subject invocation (supports video with audio function)
        • Query task status
        • Query task results
      • viduq2
        • Create text-to-video task
        • Create reference to video task - Non-subject invocation (video generation
        • Create reference to video task - Subject invocation (supports video with audio function)
        • Query task status
        • Query task results
      • viduq2-pro
        • Create Image-to-Video Task
        • Create First and Last Frame to Video Task
        • Create reference video generation task - non-subject invocation (video generation)
        • Query task status
        • Query task results
      • viduq2-turbo
        • Create Image-to-Video Task
        • Create First and Last Frame to Video Task
        • Query task status
        • Query task results
      • viduq3-pro
        • Create Image-to-Video Task
        • Create text-to-video task
        • Create First and Last Frame to Video Task
        • Query task status
        • Query task results
      • viduq3-turbo
        • Create Image-to-Video Task
        • Create text-to-video task
        • Create First and Last Frame to Video Task
        • Query task status
        • Query task results
  • Image Generation
    • kling-v1
      • Create text-to-image or single image-to-image task
      • Query task status
    • kling-v1-5
      • Create text-to-image or single image-to-image task
      • Query task status
    • kling-v2
      • Create text-to-image or single image-to-image task
      • Create multi-image-to-image task
      • Query task status
    • kling-v2-new
      • Create single image-to-image task
      • Query task status
    • kling-v2-1
      • Create text-to-image or single image-to-image task
      • Create multi-image-to-image task
      • Query task status
    • gemini-2.5-flash-image
      • Chat interface - supports text-to-image, image-to-image, and pure conversation
      • Text-to-image API - Generate images from text descriptions
      • Image-to-image API - Generate new images based on input images
    • gemini-3.0-pro-image-preview
      • Chat interface - supports text-to-image, image-to-image, and pure conversation
      • Text-to-image API - Generate images from text descriptions
      • Image-to-image API - Generate new images based on input images
    • gemini-3.1-flash-image-preview
      • Chat interface - supports text-to-image, image-to-image, and pure conversation
      • Text-to-image API - Generate images from text descriptions
      • Image-to-image API - Generate new images based on input images
    • kling-image-o1
      • Create image generation task
      • Query image generation task
      • Get Result
  • Files
    • Create file upload task
    • Query file status
    • List user files
  • Schemas
    • Chat
      • ChatCompletionRequest
      • ChatCompletionRequestMessage
      • ToolObject
      • ChatTemplateKwargs
      • ThinkType
      • ReasoningType
      • ImageConfig
      • SafetySetting
      • MessageContent
      • ImageUrl
      • VideoUrl
      • InputAudio
      • FileUrl
      • CacheControl
      • FunctionCall
      • ToolCall
      • ToolCallFunction
      • Image
      • ThinkingBlock
      • ToolFunction
      • ToolParameters
    • Video
      • kling-v2-1
        • KlingV21CreateRequest
        • KlingV21CreateResponse
        • KlingV21StatusResponse
      • kling-v2-5-turbo
        • KlingV25TurboCreateRequest
        • KlingV25TurboCreateResponse
        • KlingV25TurboStatusResponse
      • kling-video-o1
        • KlingVideoO1CreateRequest
        • KlingVideoO1CreateResponse
        • KlingVideoO1StatusResponse
      • kling-v3-omni
        • KlingV3OmniCreateRequest
      • kling-v3
        • KlingV3CreateRequest
      • kling-v2-6
        • KlingV26CreateRequest
        • KlingV26CreateResponse
        • KlingV26VideoStatusResponse
      • Veo
        • CreateVideoGenerationRequest
        • CreateVideoGenerationResponse
        • VideoGenerationJobInfo
        • ErrorResponse
        • Instance
        • ImageInput
        • LastFrameInput
        • VideoInput
        • ReferenceImage
        • Parameters
        • VideoGenerationData
        • VideoResult
      • VideoCreateResponse
    • Image Generation
      • kling-v1
        • KlingV1CreateImageRequest
      • kling-v1-5
        • KlingV15CreateImageRequest
      • kling-v2
        • KlingV2CreateImageRequest
        • KlingV2EditImageRequest
      • kling-v2-new
        • KlingV2NewCreateImageRequest
      • kling-v2-1
        • KlingV21CreateImageRequest
        • KlingV21EditImageRequest
      • gemini-2.5-flash-image
        • Gemini25FlashImageChatCompletionRequest
        • Gemini25FlashImageGenerationRequest
        • Gemini25FlashImageEditRequest
        • Gemini25FlashImageConfig
      • gemini-3.0-pro-image-preview
        • Gemini30ProImageChatCompletionRequest
        • Gemini30ProImageGenerationRequest
        • Gemini30ProImageEditRequest
        • Gemini30ProImageConfig
      • KlingImageTaskResponse
      • KlingImageTaskStatusResponse
      • ChatCompletionResponse
      • ImageGenerationResponse
      • FalOmniImageRequest
      • Gemini31FlashImageChatCompletionRequest
      • Gemini31FlashImageGenerationRequest
      • Gemini31FlashImageEditRequest
      • ChatMessage
      • Gemini31FlashImageConfig
    • CreateFileRequest
    • QueueStatus
    • ContentItem
    • FileResponse
    • Veo31FirstLastFrameToVideoInput
    • ToolItem
    • CreateVideoTaskResponse
    • FileListResponse
    • ApiErrorBody
    • FileDeleteResponse
    • GetVideoTaskResponse
    • Veo31ImageToVideoInput
    • Veo31ImageToVideoOutput
    • ChatCompletionResponse
    • FileError
    • ImageGenerationResponse
    • ErrorResponse
    • KodoSource
    • File
    • ImageUrlObject
    • VideoUrlObject
    • AudioUrlObject
    • DraftTaskObject
    • ChatMessage
    • VideoTaskOutputContent
    • VideoTaskToolUsageItem
    • VideoTaskUsage
  1. gemini-3.1-pro-preview

gemini-3.1-pro-preview qfile

POST
/v1/chat/completions

🚀 Usage Example: From Upload to Inference#

The following demonstrates how to use a file in the model inference API after file processing is complete and you've obtained the file_id.

Scenario: Video Understanding#

Suppose you've uploaded a long video through this API and obtained the file ID: qfile-123-1770719212268100147-e0011b.
Request Instructions:
In the inference API (Chat/Completions) messages array, specify type as file or image_url, and fill in the corresponding file_id or url.
Request Body (JSON):
{
    "stream": false,
    "model": "gemini-3.0-pro-preview",
    "messages": [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "What happened in this video? Please describe in detail."
                },
                {
                    "type": "file",
                    "file": {
                        "file_id": "qfile-123-1770719212268100147-e0011b",
                        "format": "video/mp4"
                    }
                }
            ]
        }
    ]
}

Request

Authorization
API Key
Add parameter in header
Authorization
Example:
Authorization: ********************
or
Body Params application/json

Example
{
    "stream": false,
    "model": "gemini-3.0-pro-preview",
    "messages": [
        {
            "content": [
                {
                    "text": "What is this",
                    "type": "text"
                },
                {
                    "type": "file",
                    "file": {
                        "file_id": "qfile-xxxx-1770719212268100147-e0011b",
                        "format": "video/mp4"
                    }
                }
            ],
            "role": "user"
        }
    ]
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api-xmodel.nexconn.ai/v1/chat/completions' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
    "stream": false,
    "model": "gemini-3.0-pro-preview",
    "messages": [
        {
            "content": [
                {
                    "text": "What is this",
                    "type": "text"
                },
                {
                    "type": "file",
                    "file": {
                        "file_id": "qfile-xxxx-1770719212268100147-e0011b",
                        "format": "video/mp4"
                    }
                }
            ],
            "role": "user"
        }
    ]
}'

Responses

🟢200Success
application/json
Bodyapplication/json

Example
{
    "id": "chatcmpl-2e7870e2d61a4b98a156c329d9ffd6b9",
    "object": "chat.completion",
    "created": 1767161430,
    "model": "gemini-3.0-pro-preview",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "This video shows a transition from a grand scene to microscopic details, seemingly telling a story about \"coming home\" or \"arrival\". Here is a detailed description in chronological order:\n\n1.  **00:00 - 00:01 (Wide Shot/Establishing Shot):**\n    *   The video begins with a hazy cityscape in the distance, with warm orange-yellow tones suggesting sunset or sunrise.\n    *   Many building silhouettes can be seen in the distance, including spires and domes, with an exotic or ancient style.\n    *   The foreground shows the back of a boy standing in grass, looking toward the distant city.\n\n2.  **00:01 - 00:02 (Medium Shot/Transition):**\n    *   The camera moves forward as the boy walks toward a simple cottage on a hillside or elevated ground.\n    *   The background remains the city bathed in golden light.\n    *   The camera follows the boy indoors, marking a perspective shift from the vast outdoor space to an intimate domestic space.\n\n3.  **00:02 - 00:03 (Interior/Character):**\n    *   The perspective is behind the boy, following him through the doorway into the room.\n    *   This is a slightly dim but cozy interior scene. In the center of the room is a wooden table with food on it.\n    *   This shot establishes a sense of anticipation, as if the boy has returned for what's on the table.\n\n4.  **00:03 - 00:04 (Close-up/Still Life):**\n    *   The camera cuts directly to a close-up of the food on the table, an overhead shot.\n    *   This is a rustic dark wooden table. On a wooden board on the table sits an elegantly decorated cake, which appears to have pear slices and cream on it.\n    *   Beside it are ingredients: sliced pears, a bowl of nuts (possibly almond slices), a small bowl of golden fruit, along with a casually placed linen napkin and decorative dried branches.\n    *   The overall style is very artistic with still-life painting aesthetics, with delicate light and shadow treatment.\n\n**Summary:**\nThe video depicts a boy passing through a cityscape bathed in golden sunlight, returning home, with the final focus on an exquisite and tempting dessert (pear cake) on the dining table. This could be the opening of a food video, or a heartwarming short film expressing \"the taste of home\".",
                "reasoning_content": "**Examining the Core Task**\n\nI've just begun unpacking the central task: to describe a video, given its keyframes and timestamps. The analysis starts with understanding the provided input, which is keyframes and timings. This sets the stage. Now, I'm defining the scope and nature of the challenge ahead. I'm focusing on the first step: parsing the input.\n\n\n**Defining Frame-Level Analyses**\n\nMy current focus is on breaking down each keyframe for individual analysis. I'm considering visual elements like objects, people, and scenes within each frame. It's becoming evident that object recognition and scene classification will be pivotal. I am considering the context of each image.\n\n\n"
            },
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 323,
        "completion_tokens": 654,
        "total_tokens": 977,
        "prompt_tokens_details": {
            "text_tokens": 3
        },
        "completion_tokens_details": {
            "reasoning_tokens": 109,
            "text_tokens": 545
        }
    }
}
🟠400Invalid request
Modified at 2026-04-24 10:39:56
Previous
gemini-3.1-pro-preview reasoning
Next
gemini-2.5-pro reasoning
Built with