1. Google
数游科技 API接口文档
  • API Reference
    • Create Chat Completion
      POST
    • 刷新缓存接口
      POST
    • Get generation
      GET
  • AIGC 模型接口
    • 接口文档说明
    • OpenAI
      • 对话补全接口
      • 对话响应接口
      • 图片生成接口
      • 图片编辑接口
      • 图片变化接口
      • 视频生成接口
      • 视频查询接口
      • 视频下载接口
      • 音频-TTS文本转语音
      • 音频-ASR语音转文本
      • 向量生成接口
    • Google
      • Gemini 生成内容接口
        POST
      • Gemini 生成内容流式回答接口
        POST
      • Veo 视频生成接口
        POST
    • Anthropic
      • 对话消息接口
  • 通用API接口
    • 通用接口
      POST
  • AI管理
    • 阿里云百炼
      • 通用文本向量同步接口
    • 通用--chat/completions-对话补全接口
      POST
    • Deepseek--beta/completions-FIM补全接口
      POST
    • OpenAI-images/generations-文生图
      POST
    • OpenAI-images/edits-图像编辑
      POST
    • OpenAI-images/variations-图片变形接口
      POST
    • OpenAI-embeddings-文本向量化
      POST
    • OpenAI-moderations-检查文本或图片是否违规接口
      POST
    • OpenAI-audio/speech-文本转语音接口
      POST
    • OpenAI-audio/transcriptions-语音转文本接口
      POST
    • OpenAI-audio/translations-语音翻译接口
      POST
    • 阿里通义万相-文生图接口
      POST
    • 阿里通义万相-通用图像编辑接口
      POST
    • 阿里通义万相-人像风格重绘接口
      POST
    • 阿里通义万相-图像背景生成接口
      POST
    • 阿里通义万相-人物写真生成接口
      POST
    • 阿里通义万相-文字变形接口
      POST
    • 阿里通义万相-文字纹理接口
      POST
    • 通义万相-图片查询接口
      GET
  • 测试第三方API接口
    • openrouter-openai/gpt-5.1
    • openrouter-google/gemini-2.5-flash-image-preview
    • openrouter-google/gemini-3-pro-image-preview
    • openrouter-google/gemini-3-pro-preview
    • poloapi-sora-2-pro
    • openrouter-x-ai/grok-4.1-fast
    • zenmux-google/gemini-3-pro-image-preview
    • zenmux-google/gemini-3-pro-preview-free
    • minimaxi-image-01
    • ploapi-FaceSwap
    • pollinations.ai
    • pollinations.ai Copy
    • http://dzenkkupvrkm.sealosbja.site:1337/
    • openrouter-google/gemini-2.5-flash-image-preview Copy
    • openrouter-openai/gpt-5.1 Copy
    • openrouter-openai/gpt-5.1 Copy
    • https://openrouter.ai/api/v1/generation
    • work.poloapi.com/gpt5.1
    • openrouter-openai/gpt-5.1---供应商key
    • https://openrouter.ai/api/v1/generation---供应商key
    • openrouter-openai/gpt-5.1 Copy Copy
    • openrouter-openai/gpt-5.1---供应商key Copy
    • api.openaius.com/grok-4.1-fast
    • api.openaius.com/gpt-5.1
    • api.openaius.com/gpt-5.1 Copy
    • Replicate接口
    • 未命名接口
    • Fal接口
    • Fal Get接口
  1. Google

Gemini 生成内容流式回答接口

开发中
POST
https://api.shuyou.ai/v1beta/models/{model}:streamGenerateContent
Gemini API 官方文档地址:
https://ai.google.dev/api/generate-content?hl=zh-cn

请求参数

Path 参数

Body 参数application/json

示例
{
    "contents": [
        {
            "role": "string",
            "parts": [
                {
                    "thought": true,
                    "thoughtSignature": "string",
                    "partMetadata": {},
                    "text": "string",
                    "inlineData": {
                        "mimeType": "string",
                        "data": "string"
                    },
                    "functionCall": {
                        "id": "string",
                        "name": "string",
                        "args": {}
                    },
                    "functionResponse": {
                        "id": "string",
                        "name": "string",
                        "response": {},
                        "parts": [
                            {}
                        ],
                        "willContinue": true,
                        "scheduling": "string"
                    },
                    "fileData": {
                        "mimeType": "string",
                        "fileUri": "string"
                    },
                    "executableCode": {
                        "language": "string",
                        "code": "string"
                    },
                    "codeExecutionResult": {
                        "outcome": "string",
                        "output": "string"
                    },
                    "videoMetadata": {
                        "startOffset": "string",
                        "endOffset": "string",
                        "fps": 0
                    }
                }
            ]
        }
    ],
    "tools": [
        {
            "functionDeclarations": [
                {
                    "name": "string",
                    "description": "string"
                }
            ],
            "googleSearchRetrieval": {},
            "codeExecution": {},
            "googleSearch": {},
            "computerUse": {},
            "urlContext": {},
            "fileSearch": {},
            "googleMaps": {}
        }
    ],
    "toolConfig": {
        "functionCallingConfig": {},
        "retrievalConfig": {}
    },
    "safetySettings": [
        "string"
    ],
    "systemInstruction": {},
    "generationConfig": {
        "stopSequences": [
            "string"
        ],
        "responseMimeType": "string",
        "responseSchema": {},
        "responseModalities": [
            "string"
        ],
        "candidateCount": 0,
        "maxOutputTokens": 0,
        "temperature": 0,
        "topK": 0,
        "seed": 0,
        "presencePenalty": 0,
        "frequencyPenalty": 0,
        "responseLogprobs": true,
        "logprobs": 0,
        "enableEnhancedCivicAnswers": true,
        "speechConfig": {
            "voiceConfig": {},
            "multiSpeakerVoiceConfig": {},
            "languageCode": "string"
        },
        "thinkingConfig": {
            "includeThoughts": true,
            "thinkingBudget": 0,
            "thinkingLevel": "string"
        },
        "imageConfig": {
            "aspectRatio": "string",
            "imageSize": "string"
        },
        "mediaResolution": "string"
    },
    "cachedContent": "string"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://api.shuyou.ai/v1beta/models/:streamGenerateContent' \
--header 'Content-Type: application/json' \
--data '{
    "contents": [
        {
            "role": "string",
            "parts": [
                {
                    "thought": true,
                    "thoughtSignature": "string",
                    "partMetadata": {},
                    "text": "string",
                    "inlineData": {
                        "mimeType": "string",
                        "data": "string"
                    },
                    "functionCall": {
                        "id": "string",
                        "name": "string",
                        "args": {}
                    },
                    "functionResponse": {
                        "id": "string",
                        "name": "string",
                        "response": {},
                        "parts": [
                            {}
                        ],
                        "willContinue": true,
                        "scheduling": "string"
                    },
                    "fileData": {
                        "mimeType": "string",
                        "fileUri": "string"
                    },
                    "executableCode": {
                        "language": "string",
                        "code": "string"
                    },
                    "codeExecutionResult": {
                        "outcome": "string",
                        "output": "string"
                    },
                    "videoMetadata": {
                        "startOffset": "string",
                        "endOffset": "string",
                        "fps": 0
                    }
                }
            ]
        }
    ],
    "tools": [
        {
            "functionDeclarations": [
                {
                    "name": "string",
                    "description": "string"
                }
            ],
            "googleSearchRetrieval": {},
            "codeExecution": {},
            "googleSearch": {},
            "computerUse": {},
            "urlContext": {},
            "fileSearch": {},
            "googleMaps": {}
        }
    ],
    "toolConfig": {
        "functionCallingConfig": {},
        "retrievalConfig": {}
    },
    "safetySettings": [
        "string"
    ],
    "systemInstruction": {},
    "generationConfig": {
        "stopSequences": [
            "string"
        ],
        "responseMimeType": "string",
        "responseSchema": {},
        "responseModalities": [
            "string"
        ],
        "candidateCount": 0,
        "maxOutputTokens": 0,
        "temperature": 0,
        "topK": 0,
        "seed": 0,
        "presencePenalty": 0,
        "frequencyPenalty": 0,
        "responseLogprobs": true,
        "logprobs": 0,
        "enableEnhancedCivicAnswers": true,
        "speechConfig": {
            "voiceConfig": {},
            "multiSpeakerVoiceConfig": {},
            "languageCode": "string"
        },
        "thinkingConfig": {
            "includeThoughts": true,
            "thinkingBudget": 0,
            "thinkingLevel": "string"
        },
        "imageConfig": {
            "aspectRatio": "string",
            "imageSize": "string"
        },
        "mediaResolution": "string"
    },
    "cachedContent": "string"
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{}
上一页
Gemini 生成内容接口
下一页
Veo 视频生成接口
Built with