エッジ開発者プラットフォーム
  • AIゲートウェイ
    • 製品概要
    • 早速スタート。
    • 開発ガイド
      • V1
      • V2
        • 概要
        • パブリックリクエストヘッダーの概要
        • ラベル-混合物
        • 百度-千帆
        • バイト-豆パック
        • アリ·トゥン
        • Moonshot—KIMI
        • ミニマックス
        • Open AI
        • 双子
    • よくある質問
    • 製品の動向
このページは現在英語版のみで提供されており、日本語版も近日中に提供される予定です。ご利用いただきありがとうございます。

双子

Request URL

https://ai-gateway-intl.eo-edgefunctions7.com

Request method

POST

Request headers

Parameter name
Required
Type
Description
OE-Key
Yes
string
Gateway API key
OE-Gateway-Name
Yes
string
Gateway name
OE-AI-Provider
Yes
string
AI Service Provider, fixed value: gemini
OE-Gateway-Version
Yes
string
Gateway version, fixed value: 2
X-Goog-Api-Key
Yes
string
Authentication Key of LLM Service Provider
Content-Type
Yes
string
Fixed value: application/json

Request body

Parameter name
Required
Type
Description
messages
Yes
array
Message list, each message includes role and content
stream
Yes
boolean
Enable stream processing
Request Body Example
{
"messages": [
{
"content": "1+1=?"
}
]
"stream": true
}

Sample response

The response format is JSON, and the specific content depends on the actual API return result.

Sample code for curl request

curl --location --request POST 'https://ai-gateway-intl.eo-edgefunctions7.com' \
--header 'OE-Key: xxxx' \
--header 'OE-Gateway-Name: xxxx' \
--header 'OE-AI-Provider: gemini' \
--header 'OE-Gateway-Version: 2' \
--header 'X-Goog-Api-Key: xxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"messages": [
{
"content": "1+1=?"
}
]
"stream":true
}'

Notes

Note:
1. Please ensure all required parameters are correctly filled out.
2. Adjust the X-Goog-Api-Key header according to the actual situation.
3. The messages array in the request body can contain multiple Message Objects, depending on business needs.