Grok AIへの質問
Grok AIへの質問.
APIリファレンスに戻る
/Grok Endpoints
POST
/v3/twitter/grok/askAPI 認証
AuthorizationBearer token · header必須TwexAPIのグローバル認証トークン (Bearer Token)。ヘッダーに含める必要があります:Authorization: Bearer <YOUR_TWEXAPI_KEY>。
リクエストボディ
必須application/jsonpromptstring必須User prompt.
conversation_idstring | anyContinue an existing Grok conversation.
プロパティを表示プロパティを非表示
Any of:
string
stringany
anymodelstring | anyOptional model id (default grok-3-latest).
default: "grok-3-latest"
プロパティを表示プロパティを非表示
Any of:
string
stringany
anycookiestring必須ユーザー自身が承認した Twitter セッション資格情報または auth_token(BYOC — Bring Your Own Cookie)。機密情報は保存されず、完全なステートレスプロキシとして実行されます。詳細は [認証・セキュリティガイド](/ja/authentication#write-operations--byoc-bring-your-own-cookie) および [Cookie 取得手順](https://youtube-promotion.pages.dev/how-to-get-twitter-cookie) を参照。
proxystring | anyOptional HTTP proxy. Example: http://username:password@ip:port
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyレスポンス
200Grok response result.
codeinteger必須HTTP ステータスコード(200 は成功)
msgstring必須レスポンスメッセージ(例: 'success')
dataGrokAskResult | any返却されるコアデータオブジェクトまたは配列
プロパティを表示プロパティを非表示
Any of:
GrokAskResult
conversation_idstring必須Grok conversation id
user_chat_item_idstring | anyUser chat item id
プロパティを表示プロパティを非表示
Any of:
string
stringany
anyagent_chat_item_idstring | anyAgent chat item id
プロパティを表示プロパティを非表示
Any of:
string
stringany
anymessagestring必須Final assistant message
reasoningstring | anyReasoning text
プロパティを表示プロパティを非表示
Any of:
string
stringany
anysoft_stopboolean | anyWhether response soft-stopped
プロパティを表示プロパティを非表示
Any of:
boolean
booleanany
anyfollow_up_suggestionsGrokFollowUpSuggestion[]Follow-up suggestions
プロパティを表示プロパティを非表示
Array of
GrokFollowUpSuggestionlabelstring必須Suggestion label
propertiesobject | anySuggestion properties
プロパティを表示プロパティを非表示
Any of:
object
objectany
anytools_overridesobject | anyTools overrides
プロパティを表示プロパティを非表示
Any of:
object
objectany
anyany
any422パラメータバリデーションエラー
detailValidationError[]プロパティを表示プロパティを非表示
Array of
ValidationErrorlocstring | integer[]必須プロパティを表示プロパティを非表示
Array of
string | integerAny of:
string
stringinteger
integermsgstring必須レスポンスメッセージ(例: 'success')
typestring必須inputanyctxobject⚡インタラクティブテストPOST
⚡インタラクティブテスト / Try APIPOSTLive Console
🌐対象サーバー:
https://api.twexapi.io● 本番環境レディ
✍️
書き込み操作の認証情報ガイド(TwexAPIキー + Twitter Cookie)
1. TwexAPIプラットフォームキー (Bearer Token): 下記の「API認証」に入力してください(API呼び出しと課金認証に使用)。
2. TwitterアカウントCookie: ツイート・いいね・フォロー等の書き込み操作のため、下記リクエストボディの cookie フィールドに対象TwitterアカウントのCookie(例: auth_token=...; ct0=...)を入力してください。
🔑API 認証
📝リクエストボディapplication/json
📡
暂无响应数据
请在「请求配置」中确认参数后,点击底部的「发送请求」按钮。
リクエスト例
curl -X POST "https://api.twexapi.io/v3/twitter/grok/ask" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Say hi in one sentence.",
"conversation_id": "2076320454898278729",
"model": "grok-3-latest",
"cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
"proxy": "http://username:password@ip:port"
}'const response = await fetch("https://api.twexapi.io/v3/twitter/grok/ask", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"prompt": "Say hi in one sentence.",
"conversation_id": "2076320454898278729",
"model": "grok-3-latest",
"cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
"proxy": "http://username:password@ip:port"
})
});import requests
response = requests.post(
"https://api.twexapi.io/v3/twitter/grok/ask",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"prompt": "Say hi in one sentence.",
"conversation_id": "2076320454898278729",
"model": "grok-3-latest",
"cookie": "ct0=abc123... or 2c4a4e1832096aa694c739b83c83b6d96d43eba7",
"proxy": "http://username:password@ip:port"
},
)レスポンス例
{
"code": 200,
"msg": "success",
"data": {
"conversation_id": "2076320454898278729",
"user_chat_item_id": "string",
"agent_chat_item_id": "string",
"message": "Hi there!",
"reasoning": "Thinking about your request",
"soft_stop": true,
"follow_up_suggestions": [
{
"label": "Learn about conversational AI",
"properties": {},
"tools_overrides": {}
}
]
}
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}