Get an upload
curl --request GET \
--url https://guidinghand.ai/v1/uploads/{upload_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/uploads/{upload_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/uploads/{upload_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "upload",
"id": "<string>",
"filename": "<string>",
"content_type": "<string>",
"kind": "image",
"bytes": 123,
"source": "person",
"conversation_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Uploads
Get an upload
GET
/
v1
/
uploads
/
{upload_id}
Get an upload
curl --request GET \
--url https://guidinghand.ai/v1/uploads/{upload_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/uploads/{upload_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/uploads/{upload_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "upload",
"id": "<string>",
"filename": "<string>",
"content_type": "<string>",
"kind": "image",
"bytes": 123,
"source": "person",
"conversation_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Authorizations
An org API key (gh_live_…) from Settings → API keys in the console.
Path Parameters
The upload’s id, upl_….
Response
The upload.
A file for a conversation (POST /v1/uploads). Attach it to a message with attachments; then it belongs to that conversation and is kept as long as it is. One no message sent is deleted after a day.
upl_…
From the file’s bytes and name (a CSV is text/csv whatever the browser said).
How the model gets it: image (PNG, JPEG, GIF or WebP) and pdf it sees; text it reads (long files are cut); other only its code sandbox opens (Run code).
Available options:
image, pdf, text, other person: uploaded with the API or in the console. agent: made by the agent’s code.
Available options:
person, agent The conversation it was sent in; null until then.
When it’s deleted if no message sends it; null once sent.