putty
API ReferenceInference

Download an attachment's bytes

Returns the raw bytes of an attachment that belongs to a message on a thread the caller owns. The Content-Type is the MIME type the client uploaded. The endpoint 404s when the thread, message, or attachment is not found for the caller, so the id cannot be used to fetch another user's file.

GET
/inference/threads/{id}/messages/{messageId}/attachments/{attachmentId}

Returns the raw bytes of an attachment that belongs to a message on a thread the caller owns. The Content-Type is the MIME type the client uploaded. The endpoint 404s when the thread, message, or attachment is not found for the caller, so the id cannot be used to fetch another user's file.

Authorization

bearerAuth
AuthorizationBearer <token>

A bearer token. The Account routes accept a Privy access token; the MCP transport accepts an sk- API key issued by POST /account/api-keys.

In: header

Path Parameters

id*string

The thread id.

messageId*string

The message id.

attachmentId*string

The attachment id.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/inference/threads/string/messages/string/attachments/string"
"string"