Error
A valid request URL is required to generate request examples{
"candidates": [
{
"content": {
"role": "user",
"parts": [
{
"text": "<string>",
"thought": true,
"thoughtSignature": "aSDinaTvuI8gbWludGxpZnk=",
"inlineData": {
"mimeType": "<string>",
"data": "aSDinaTvuI8gbWludGxpZnk=",
"displayName": "<string>"
},
"fileData": {
"mimeType": "<string>",
"fileUri": "<string>",
"displayName": "<string>"
},
"functionCall": {
"id": "<string>",
"name": "<string>",
"args": {}
},
"functionResponse": {
"id": "<string>",
"name": "<string>",
"response": {},
"willContinue": true,
"scheduling": "<string>"
},
"executableCode": {
"language": "<string>",
"code": "<string>"
},
"codeExecutionResult": {
"outcome": "OUTCOME_UNSPECIFIED",
"output": "<string>"
},
"videoMetadata": {
"fps": 123,
"startOffset": "<string>",
"endOffset": "<string>"
},
"mediaResolution": {
"level": "MEDIA_RESOLUTION_UNSPECIFIED",
"numTokens": 123
}
}
]
},
"finishReason": "FINISH_REASON_UNSPECIFIED",
"finishMessage": "<string>",
"tokenCount": 123,
"safetyRatings": [
{
"category": "<string>",
"probability": "<string>",
"probabilityScore": 123,
"severity": "<string>",
"severityScore": 123,
"blocked": true,
"overwrittenThreshold": "<string>"
}
],
"citationMetadata": {},
"index": 123,
"groundingMetadata": {},
"urlContextMetadata": {
"urlMetadata": [
{
"retrievedUrl": "<string>",
"urlRetrievalStatus": "<string>"
}
]
},
"avgLogprobs": 123,
"logprobsResult": {
"chosenCandidates": [
{
"token": "<string>",
"tokenId": 123,
"logProbability": 123
}
],
"topCandidates": [
{
"candidates": [
{
"token": "<string>",
"tokenId": 123,
"logProbability": 123
}
]
}
]
}
}
],
"promptFeedback": {
"blockReason": "<string>",
"blockReasonMessage": "<string>",
"safetyRatings": [
{
"category": "<string>",
"probability": "<string>",
"probabilityScore": 123,
"severity": "<string>",
"severityScore": 123,
"blocked": true,
"overwrittenThreshold": "<string>"
}
]
},
"usageMetadata": {
"promptTokenCount": 123,
"candidatesTokenCount": 123,
"totalTokenCount": 123,
"cachedContentTokenCount": 123,
"thoughtsTokenCount": 123,
"toolUsePromptTokenCount": 123,
"trafficType": "<string>",
"cacheTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"candidatesTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"promptTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"toolUsePromptTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
]
},
"modelVersion": "<string>",
"responseId": "<string>",
"createTime": "2023-11-07T05:31:56Z"
}{
"error": {
"code": 123,
"message": "<string>",
"status": "<string>",
"details": [
{
"@type": "<string>",
"fieldViolations": [
{
"description": "<string>"
}
]
}
]
}
}{
"error": {
"code": 123,
"message": "<string>",
"status": "<string>",
"details": [
{
"@type": "<string>",
"fieldViolations": [
{
"description": "<string>"
}
]
}
]
}
}LiteLLM Integration
Stream generate content (LiteLLM - Gemini format)
Streams content generation using Google Gemini-compatible format via LiteLLM.
POST
/
litellm
/
genai
/
v1beta
/
models
/
{model}
:streamGenerateContent
Error
A valid request URL is required to generate request examples{
"candidates": [
{
"content": {
"role": "user",
"parts": [
{
"text": "<string>",
"thought": true,
"thoughtSignature": "aSDinaTvuI8gbWludGxpZnk=",
"inlineData": {
"mimeType": "<string>",
"data": "aSDinaTvuI8gbWludGxpZnk=",
"displayName": "<string>"
},
"fileData": {
"mimeType": "<string>",
"fileUri": "<string>",
"displayName": "<string>"
},
"functionCall": {
"id": "<string>",
"name": "<string>",
"args": {}
},
"functionResponse": {
"id": "<string>",
"name": "<string>",
"response": {},
"willContinue": true,
"scheduling": "<string>"
},
"executableCode": {
"language": "<string>",
"code": "<string>"
},
"codeExecutionResult": {
"outcome": "OUTCOME_UNSPECIFIED",
"output": "<string>"
},
"videoMetadata": {
"fps": 123,
"startOffset": "<string>",
"endOffset": "<string>"
},
"mediaResolution": {
"level": "MEDIA_RESOLUTION_UNSPECIFIED",
"numTokens": 123
}
}
]
},
"finishReason": "FINISH_REASON_UNSPECIFIED",
"finishMessage": "<string>",
"tokenCount": 123,
"safetyRatings": [
{
"category": "<string>",
"probability": "<string>",
"probabilityScore": 123,
"severity": "<string>",
"severityScore": 123,
"blocked": true,
"overwrittenThreshold": "<string>"
}
],
"citationMetadata": {},
"index": 123,
"groundingMetadata": {},
"urlContextMetadata": {
"urlMetadata": [
{
"retrievedUrl": "<string>",
"urlRetrievalStatus": "<string>"
}
]
},
"avgLogprobs": 123,
"logprobsResult": {
"chosenCandidates": [
{
"token": "<string>",
"tokenId": 123,
"logProbability": 123
}
],
"topCandidates": [
{
"candidates": [
{
"token": "<string>",
"tokenId": 123,
"logProbability": 123
}
]
}
]
}
}
],
"promptFeedback": {
"blockReason": "<string>",
"blockReasonMessage": "<string>",
"safetyRatings": [
{
"category": "<string>",
"probability": "<string>",
"probabilityScore": 123,
"severity": "<string>",
"severityScore": 123,
"blocked": true,
"overwrittenThreshold": "<string>"
}
]
},
"usageMetadata": {
"promptTokenCount": 123,
"candidatesTokenCount": 123,
"totalTokenCount": 123,
"cachedContentTokenCount": 123,
"thoughtsTokenCount": 123,
"toolUsePromptTokenCount": 123,
"trafficType": "<string>",
"cacheTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"candidatesTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"promptTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"toolUsePromptTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
]
},
"modelVersion": "<string>",
"responseId": "<string>",
"createTime": "2023-11-07T05:31:56Z"
}{
"error": {
"code": 123,
"message": "<string>",
"status": "<string>",
"details": [
{
"@type": "<string>",
"fieldViolations": [
{
"description": "<string>"
}
]
}
]
}
}{
"error": {
"code": 123,
"message": "<string>",
"status": "<string>",
"details": [
{
"@type": "<string>",
"fieldViolations": [
{
"description": "<string>"
}
]
}
]
}
}Authorizations
BearerAuthVirtualKeyAuthApiKeyAuth
Body
application/json
Response
Successful streaming response
Was this page helpful?

