curl --request GET \
--url http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}import requests
url = "http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"mediaResolution": {
"level": "MEDIA_RESOLUTION_UNSPECIFIED",
"numTokens": 123
},
"codeExecutionResult": {
"outcome": "OUTCOME_UNSPECIFIED",
"output": "<string>",
"id": "<string>"
},
"executableCode": {
"code": "<string>",
"language": "LANGUAGE_UNSPECIFIED",
"id": "<string>"
},
"fileData": {
"displayName": "<string>",
"fileUri": "<string>",
"mimeType": "<string>"
},
"functionCall": {
"id": "<string>",
"args": {},
"name": "<string>",
"partialArgs": [
{
"boolValue": true,
"jsonPath": "<string>",
"nullValue": "NULL_VALUE",
"numberValue": 123,
"stringValue": "<string>",
"willContinue": true
}
],
"willContinue": true
},
"functionResponse": {
"willContinue": true,
"scheduling": "SCHEDULING_UNSPECIFIED",
"parts": [
{
"inlineData": {
"mimeType": "<string>",
"data": "<string>",
"displayName": "<string>"
},
"fileData": {
"fileUri": "<string>",
"mimeType": "<string>",
"displayName": "<string>"
}
}
],
"id": "<string>",
"name": "<string>",
"response": {}
},
"inlineData": {
"data": "<string>",
"displayName": "<string>",
"mimeType": "<string>"
},
"text": "<string>",
"thought": true,
"thoughtSignature": "<string>",
"videoMetadata": {
"endOffset": "<string>",
"fps": 123,
"startOffset": "<string>"
},
"toolCall": {
"id": "<string>",
"toolType": "TOOL_TYPE_UNSPECIFIED",
"args": {}
},
"toolResponse": {
"id": "<string>",
"toolType": "TOOL_TYPE_UNSPECIFIED",
"response": {}
},
"partMetadata": {}
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Get the latest artifact
Return the latest artifact as a Part when version is omitted, or the selected version when the version query parameter is supplied; a missing artifact or version returns 404
curl --request GET \
--url http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}import requests
url = "http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:8000/apps/{app_name}/users/{user_id}/sessions/{session_id}/artifacts/{artifact_name}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"mediaResolution": {
"level": "MEDIA_RESOLUTION_UNSPECIFIED",
"numTokens": 123
},
"codeExecutionResult": {
"outcome": "OUTCOME_UNSPECIFIED",
"output": "<string>",
"id": "<string>"
},
"executableCode": {
"code": "<string>",
"language": "LANGUAGE_UNSPECIFIED",
"id": "<string>"
},
"fileData": {
"displayName": "<string>",
"fileUri": "<string>",
"mimeType": "<string>"
},
"functionCall": {
"id": "<string>",
"args": {},
"name": "<string>",
"partialArgs": [
{
"boolValue": true,
"jsonPath": "<string>",
"nullValue": "NULL_VALUE",
"numberValue": 123,
"stringValue": "<string>",
"willContinue": true
}
],
"willContinue": true
},
"functionResponse": {
"willContinue": true,
"scheduling": "SCHEDULING_UNSPECIFIED",
"parts": [
{
"inlineData": {
"mimeType": "<string>",
"data": "<string>",
"displayName": "<string>"
},
"fileData": {
"fileUri": "<string>",
"mimeType": "<string>",
"displayName": "<string>"
}
}
],
"id": "<string>",
"name": "<string>",
"response": {}
},
"inlineData": {
"data": "<string>",
"displayName": "<string>",
"mimeType": "<string>"
},
"text": "<string>",
"thought": true,
"thoughtSignature": "<string>",
"videoMetadata": {
"endOffset": "<string>",
"fps": 123,
"startOffset": "<string>"
},
"toolCall": {
"id": "<string>",
"toolType": "TOOL_TYPE_UNSPECIFIED",
"args": {}
},
"toolResponse": {
"id": "<string>",
"toolType": "TOOL_TYPE_UNSPECIFIED",
"response": {}
},
"partMetadata": {}
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}version query parameter to read the latest version, or select a version with a query such as ?version=0. Use a version number from the save response or version list; it is not part of the filename
The response is a Part object. Content can appear in text or inlineData. For binary content, decode the data and interpret it using mimeType; saving the entire JSON response does not produce the original filePath Parameters
Application name
User ID
Session ID
Artifact name
Query Parameters
Optional version number; omit it to read the latest version
Response
Successful response
Show child attributes
Show child attributes
Code execution result
Show child attributes
Show child attributes
Executable code
Show child attributes
Show child attributes
File content referenced by URI
Show child attributes
Show child attributes
Function call requested by the model
Show child attributes
Show child attributes
Function execution result
Show child attributes
Show child attributes
Inline binary content with Base64-encoded data
Show child attributes
Show child attributes
Text content
Whether this is thought content
Thought signature for subsequent requests
Video metadata
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes