Everstack
API ReferenceOpenai agents restUpload Session Input

Upload Session Input

POST/v1/openai-agents/sessions/{session-id}/inputs

JSON request body is capped at 2 MiB. content_base64 contains the file bytes.

POST/v1/openai-agents/sessions/{session-id}/inputs

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Parameters

NameInTypeRequiredDescription
session-idpathstringYes

Request Body

JSON request bodies are capped at 2 MiB.

PropertyTypeRequiredDescription
filenamestringYes
content_typestringNo
content_base64stringYes
destinationstringNo

Responses

201 Success

PropertyTypeDescription
object_idstring
filenamestring
content_typestring
size_bytesinteger
sha256string
kindstring
created_atstring

400 Invalid request

PropertyTypeDescription
errorobject

403 Permission denied

PropertyTypeDescription
errorobject

404 Not found

PropertyTypeDescription
errorobject

500 Internal error

PropertyTypeDescription
errorobject

503 Unavailable

PropertyTypeDescription
errorobject

Request

curl -X POST "http://localhost:8089/v1/openai-agents/sessions/{session-id}/inputs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename":"string","content_type":"string","content_base64":"string","destination":"string"}'
const response = await fetch("http://localhost:8089/v1/openai-agents/sessions/{session-id}/inputs", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "filename": "string",
  "content_type": "string",
  "content_base64": "string",
  "destination": "string"
}),
});
const data = await response.json();
import requests

response = requests.post(
    "http://localhost:8089/v1/openai-agents/sessions/{session-id}/inputs",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
  "filename": "string",
  "content_type": "string",
  "content_base64": "string",
  "destination": "string"
},
)
data = response.json()

Response

{
  "object_id": "string",
  "filename": "string",
  "content_type": "string",
  "size_bytes": 0,
  "sha256": "string",
  "kind": "string",
  "created_at": "string"
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}