Skip to content

Chat Upload

POST
/api/multimodal/chat-upload
curl --request POST \
--url https://api.ultimateteam.ai/api/multimodal/chat-upload \
--header 'Content-Type: multipart/form-data' \
--header 'X-API-Key: <X-API-Key>' \
--form agent_role=ceo \
--form 'context_prompt=Analyze this uploaded file.' \
--form file=example

Accept a multipart chat upload and return the analysis summary.

Args: request: The incoming FastAPI request (carries tenant context). file: Uploaded file from the multipart body. agent_role: Which C-suite agent is analysing the upload. context_prompt: Prompt passed to the vision model. analyzer: Injected analyzer dependency.

Returns: :class:MultimodalResponse carrying the analysis summary and attachment record id.

Raises: HTTPException: 422 on MIME / size violations or security failures.

Media typemultipart/form-data
Body_chat_upload_api_multimodal_chat_upload_post
object
agent_role
Agent Role
string
default: ceo
context_prompt
Context Prompt
string
default: Analyze this uploaded file.
file
required
File
string

Successful Response

Media typeapplication/json
MultimodalResponse

Canonical response body for all /api/multimodal/* endpoints.

Attributes: analysis_id: Opaque UUID for the analysis turn. summary: PII-redacted analysis summary. source_channel: Which ingestion surface this came from. mime_type: MIME type of the analyzed content. model_used: LLM model id used. credits_consumed: Total credits billed (model + 8-credit surcharge). pii_flags: QualityGate PII hits (metadata only — never raw PII). attachment_record_id: Persisted AttachmentRecord id. vision_upgrade: Tier upgrade metadata from the router.

object
analysis_id
required
Analysis Id
string
attachment_record_id
Any of:
string
credits_consumed
required
Credits Consumed
integer
mime_type
required
Mime Type
string
model_used
required
Model Used
string
pii_flags
Pii Flags
Array<object>
object
key
additional properties
any
source_channel
required
Source Channel
string
summary
required
Summary
string
vision_upgrade
Any of:
object
key
additional properties
any
Examplegenerated
{
"analysis_id": "example",
"attachment_record_id": "example",
"credits_consumed": 1,
"mime_type": "example",
"model_used": "example",
"pii_flags": [
{}
],
"source_channel": "example",
"summary": "example",
"vision_upgrade": {}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}