curl --location '/v1/models/:streamGenerateContent?key=&alt=' \
--header 'x-goog-api-key;' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"requests": [
{}
],
"contents": [
{
"role": "string",
"parts": [
{
"text": "string",
"thought": true,
"inlineData": {
"mimeType": "string",
"data": "string",
"property1": "string",
"property2": "string"
},
"functionCall": {
"id": "string",
"name": "string",
"args": null,
"partialArgs": [
{
"jsonPath": "string",
"numberValue": 0,
"stringValue": "string",
"boolValue": true,
"nullValue": null,
"willContinue": true,
"property1": "string",
"property2": "string"
}
],
"willContinue": true,
"property1": "string",
"property2": "string"
},
"thoughtSignature": null,
"functionResponse": {
"name": "string",
"response": {
"property1": "string",
"property2": "string"
},
"willContinue": null,
"scheduling": null,
"parts": null,
"id": null,
"property1": "string",
"property2": "string"
},
"mediaResolution": null,
"videoMetadata": null,
"fileData": {
"mimeType": "string",
"fileUri": "string",
"property1": "string",
"property2": "string"
},
"executableCode": {
"language": "string",
"code": "string",
"property1": "string",
"property2": "string"
},
"codeExecutionResult": {
"outcome": "string",
"output": "string",
"property1": "string",
"property2": "string"
},
"property1": "string",
"property2": "string"
}
],
"property1": "string",
"property2": "string"
}
],
"safetySettings": [
{
"category": "string",
"threshold": "string",
"property1": "string",
"property2": "string"
}
],
"generationConfig": {
"temperature": 0,
"topP": 0,
"topK": 0,
"maxOutputTokens": 0,
"candidateCount": 0,
"stopSequences": [
"string"
],
"responseMimeType": "string",
"responseSchema": null,
"responseJsonSchema": null,
"presencePenalty": 0,
"frequencyPenalty": 0,
"responseLogprobs": true,
"logprobs": 0,
"enableEnhancedCivicAnswers": true,
"mediaResolution": "string",
"seed": 0,
"responseModalities": [
"string"
],
"thinkingConfig": {
"includeThoughts": true,
"thinkingBudget": 0,
"thinkingLevel": "string",
"property1": "string",
"property2": "string"
},
"speechConfig": null,
"imageConfig": null,
"property1": "string",
"property2": "string"
},
"tools": null,
"toolConfig": {
"functionCallingConfig": {
"mode": "string",
"allowedFunctionNames": [
"string"
],
"streamFunctionCallArguments": true,
"property1": "string",
"property2": "string"
},
"retrievalConfig": {
"latLng": {
"latitude": 0,
"longitude": 0,
"property1": "string",
"property2": "string"
},
"languageCode": "string",
"property1": "string",
"property2": "string"
},
"includeServerSideToolInvocations": true,
"property1": "string",
"property2": "string"
},
"systemInstruction": {
"role": "string",
"parts": [
{
"text": "string",
"thought": true,
"inlineData": {
"mimeType": "string",
"data": "string",
"property1": "string",
"property2": "string"
},
"functionCall": {
"id": "string",
"name": "string",
"args": null,
"partialArgs": [
{
"jsonPath": "string",
"numberValue": 0,
"stringValue": "string",
"boolValue": true,
"nullValue": null,
"willContinue": true,
"property1": "string",
"property2": "string"
}
],
"willContinue": true,
"property1": "string",
"property2": "string"
},
"thoughtSignature": null,
"functionResponse": {
"name": "string",
"response": {
"property1": "string",
"property2": "string"
},
"willContinue": null,
"scheduling": null,
"parts": null,
"id": null,
"property1": "string",
"property2": "string"
},
"mediaResolution": null,
"videoMetadata": null,
"fileData": {
"mimeType": "string",
"fileUri": "string",
"property1": "string",
"property2": "string"
},
"executableCode": {
"language": "string",
"code": "string",
"property1": "string",
"property2": "string"
},
"codeExecutionResult": {
"outcome": "string",
"output": "string",
"property1": "string",
"property2": "string"
},
"property1": "string",
"property2": "string"
}
],
"property1": "string",
"property2": "string"
},
"cachedContent": "string",
"property1": "string",
"property2": "string"
}'{
"candidates": [
{
"content": {
"role": "string",
"parts": [
{
"text": "string",
"thought": true,
"inlineData": {
"mimeType": "string",
"data": "string",
"property1": "string",
"property2": "string"
},
"functionCall": {
"id": "string",
"name": "string",
"args": null,
"partialArgs": [
{
"jsonPath": "string",
"numberValue": 0,
"stringValue": "string",
"boolValue": true,
"nullValue": null,
"willContinue": true,
"property1": "string",
"property2": "string"
}
],
"willContinue": true,
"property1": "string",
"property2": "string"
},
"thoughtSignature": null,
"functionResponse": {
"name": "string",
"response": {
"property1": "string",
"property2": "string"
},
"willContinue": null,
"scheduling": null,
"parts": null,
"id": null,
"property1": "string",
"property2": "string"
},
"mediaResolution": null,
"videoMetadata": null,
"fileData": {
"mimeType": "string",
"fileUri": "string",
"property1": "string",
"property2": "string"
},
"executableCode": {
"language": "string",
"code": "string",
"property1": "string",
"property2": "string"
},
"codeExecutionResult": {
"outcome": "string",
"output": "string",
"property1": "string",
"property2": "string"
},
"property1": "string",
"property2": "string"
}
],
"property1": "string",
"property2": "string"
},
"finishReason": "string",
"index": 0,
"safetyRatings": [
{
"category": "string",
"probability": "string",
"property1": "string",
"property2": "string"
}
],
"groundingMetadata": {
"webSearchQueries": [
"string"
],
"imageSearchQueries": [
"string"
],
"retrievalQueries": [
"string"
],
"groundingChunks": null,
"groundingSupports": null,
"searchEntryPoint": null,
"retrievalMetadata": null,
"sourceFlaggingUris": null,
"googleMapsWidgetContextToken": "string",
"property1": "string",
"property2": "string"
},
"property1": "string",
"property2": "string"
}
],
"promptFeedback": {
"safetyRatings": [
{
"category": "string",
"probability": "string",
"property1": "string",
"property2": "string"
}
],
"blockReason": "string",
"property1": "string",
"property2": "string"
},
"usageMetadata": {
"promptTokenCount": 0,
"toolUsePromptTokenCount": 0,
"candidatesTokenCount": 0,
"totalTokenCount": 0,
"thoughtsTokenCount": 0,
"cachedContentTokenCount": 0,
"promptTokensDetails": [
null
],
"toolUsePromptTokensDetails": [
null
],
"candidatesTokensDetails": [
null
],
"billing_usage": {
"source": "string",
"semantic": "string",
"estimated": true,
"openai_usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0,
"prompt_cache_hit_tokens": 0,
"usage_semantic": "string",
"usage_source": "string",
"billing_usage": {},
"prompt_tokens_details": {
"cached_tokens": 0,
"cached_tokens_details": {
"text_tokens": 0,
"image_tokens": 0,
"audio_tokens": 0,
"property1": "string",
"property2": "string"
},
"cached_creation_tokens": 0,
"cache_write_tokens": 0,
"text_tokens": 0,
"audio_tokens": 0,
"image_tokens": 0,
"property1": "string",
"property2": "string"
},
"completion_tokens_details": {
"text_tokens": 0,
"audio_tokens": 0,
"image_tokens": 0,
"reasoning_tokens": 0,
"property1": "string",
"property2": "string"
},
"input_tokens": 0,
"output_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0,
"cached_tokens_details": {
"text_tokens": 0,
"image_tokens": 0,
"audio_tokens": 0,
"property1": "string",
"property2": "string"
},
"cached_creation_tokens": 0,
"cache_write_tokens": 0,
"text_tokens": 0,
"audio_tokens": 0,
"image_tokens": 0,
"property1": "string",
"property2": "string"
},
"output_tokens_details": {
"text_tokens": 0,
"audio_tokens": 0,
"image_tokens": 0,
"reasoning_tokens": 0,
"property1": "string",
"property2": "string"
},
"claude_cache_creation_5_m_tokens": 0,
"claude_cache_creation_1_h_tokens": 0,
"cost": null,
"property1": "string",
"property2": "string"
},
"claude_usage": {
"input_tokens": 0,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0,
"output_tokens": 0,
"cache_creation": null,
"claude_cache_creation_5_m_tokens": 0,
"claude_cache_creation_1_h_tokens": 0,
"server_tool_use": null,
"billing_usage": {},
"property1": "string",
"property2": "string"
},
"gemini_usage_metadata": {},
"property1": "string",
"property2": "string"
},
"property1": "string",
"property2": "string"
},
"property1": "string",
"property2": "string"
}