Upload a file to cloud bucket and attach it to the session

post/v1/session/attach_file

Request

  • The document declares no server URL.
  • Auth
    none declared

Request body

session_idstring required

The session ID this file should be attached to.

filenamestring required

The name of the file.

mime_typestring nullable

The mime type of the file. This is used as a hint, and it may be overridden.

contentstring required

The content of the file as string. Always base64 encoded.

Response

Successful Response

okboolean required

True if the operation was successful.

status_code200 | 201 | 202 | 204 | 206 | 300 | 301 | 302 | 303 | 304 | 307 | 308 | 400 | 401 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 422 | 425 | 426 | 428 | 429 | 429 | 431 | 451 | 500 | 500 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 required
status_messagestring

Describe why the operation failed.

dataobject nullable

Optional field for additional information.

mime_type'text/plain' | 'text/markdown' | 'text/serialized-json' | 'application/octet-stream' | 'image/jpeg' | 'image/png' | 'image/tiff' | 'image/gif' | 'image/svg+xml' | 'image/webp' | 'image/avif' | 'audio/wav' | 'audio/mpeg' | 'audio/ogg' | 'video/webm' | 'video/mp4' | 'text/c' | 'text/c++' | 'text/java' | 'text/rust' | 'text/go' | 'text/python' | 'text/php' | 'text/perl' | 'text/ruby' | 'text/swift' | 'text/kotlin' | 'text/scala' | 'text/javascript' | 'text/typescript' | 'text/html' | 'text/css' | 'text/csv' | 'text/xml' | 'text/yaml' | 'text/toml' | 'text/sql' | 'application/json' | 'application/jsonl' | 'application/pdf' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/msword' | 'application/vnd.ms-excel' | 'application/vnd.ms-powerpoint' | 'application/rtf' | 'application/vnd.oasis.opendocument.text' | 'sec-gemini/graph' | 'sec-gemini/timeline' | 'sec-gemini/table' | 'sec-gemini/image' | 'sec-gemini/code' | 'sec-gemini/markdown' | 'sec-gemini/json' | 'sec-gemini/html' | 'sec-gemini/canvas'

Completion type

latencynumber nullable

The time taken to complete the request in seconds.

Changes

    • breaking

      removed the enum value application/json of the request property

    • breaking

      removed the enum value application/jsonl of the request property

    • breaking

      removed the enum value application/msword of the request property

    • breaking

      removed the enum value application/octet-stream of the request property

    • breaking

      removed the enum value application/pdf of the request property

    • breaking

      removed the enum value application/rtf of the request property

    • breaking

      removed the enum value application/vnd.ms-excel of the request property

    • breaking

      removed the enum value application/vnd.ms-powerpoint of the request property

    • breaking

      removed the enum value application/vnd.oasis.opendocument.text of the request property

    • breaking

      removed the enum value application/vnd.openxmlformats-officedocument.presentationml.presentation of the request property

    • breaking

      removed the enum value application/vnd.openxmlformats-officedocument.spreadsheetml.sheet of the request property

    • breaking

      removed the enum value application/vnd.openxmlformats-officedocument.wordprocessingml.document of the request property

    • breaking

      removed the enum value audio/mpeg of the request property

    • breaking

      removed the enum value audio/ogg of the request property

    • breaking

      removed the enum value audio/wav of the request property

    • breaking

      removed the enum value image/avif of the request property

    • breaking

      removed the enum value image/gif of the request property

    • breaking

      removed the enum value image/jpeg of the request property

    • breaking

      removed the enum value image/png of the request property

    • breaking

      removed the enum value image/svg+xml of the request property

    • breaking

      removed the enum value image/tiff of the request property

    • breaking

      removed the enum value image/webp of the request property

    • breaking

      removed the enum value text/c of the request property

    • breaking

      removed the enum value text/c++ of the request property

    • breaking

      removed the enum value text/css of the request property

    • breaking

      removed the enum value text/csv of the request property

    • breaking

      removed the enum value text/go of the request property

    • breaking

      removed the enum value text/html of the request property

    • breaking

      removed the enum value text/java of the request property

    • breaking

      removed the enum value text/javascript of the request property

    • breaking

      removed the enum value text/kotlin of the request property

    • breaking

      removed the enum value text/markdown of the request property

    • breaking

      removed the enum value text/perl of the request property

    • breaking

      removed the enum value text/php of the request property

    • breaking

      removed the enum value text/plain of the request property

    • breaking

      removed the enum value text/python of the request property

    • breaking

      removed the enum value text/ruby of the request property

    • breaking

      removed the enum value text/rust of the request property

    • breaking

      removed the enum value text/scala of the request property

    • breaking

      removed the enum value text/serialized-json of the request property

    • breaking

      removed the enum value text/sql of the request property

    • breaking

      removed the enum value text/swift of the request property

    • breaking

      removed the enum value text/toml of the request property

    • breaking

      removed the enum value text/typescript of the request property

    • breaking

      removed the enum value text/xml of the request property

    • breaking

      removed the enum value text/yaml of the request property

    • breaking

      removed the enum value video/mp4 of the request property

    • breaking

      removed the enum value video/webm of the request property

    • warning

      added the new sec-gemini/canvas enum value to the / response property for the response status

    • warning

      added the new sec-gemini/code enum value to the / response property for the response status

    • warning

      added the new sec-gemini/graph enum value to the / response property for the response status

    • warning

      added the new sec-gemini/html enum value to the / response property for the response status

    • warning

      added the new sec-gemini/image enum value to the / response property for the response status

    • warning

      added the new sec-gemini/json enum value to the / response property for the response status

    • warning

      added the new sec-gemini/markdown enum value to the / response property for the response status

    • warning

      added the new sec-gemini/table enum value to the / response property for the response status

    • warning

      added the new sec-gemini/timeline enum value to the / response property for the response status

    • info

      the request property became optional

    • info

      request property deprecated

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • breaking

      request property was restricted to a list of enum values

    • breaking

      the request property became required

    • breaking

      request property list-of-types was narrowed by removing types null from media type application/json

    • info

      added the new application/json enum value to the request property

    • info

      added the new application/jsonl enum value to the request property

    • info

      added the new application/msword enum value to the request property

    • info

      added the new application/octet-stream enum value to the request property

    • info

      added the new application/pdf enum value to the request property

    • info

      added the new application/rtf enum value to the request property

    • info

      added the new application/vnd.ms-excel enum value to the request property

    • info

      added the new application/vnd.ms-powerpoint enum value to the request property

    • info

      added the new application/vnd.oasis.opendocument.text enum value to the request property

    • info

      added the new application/vnd.openxmlformats-officedocument.presentationml.presentation enum value to the request property

    • info

      added the new application/vnd.openxmlformats-officedocument.spreadsheetml.sheet enum value to the request property

    • info

      added the new application/vnd.openxmlformats-officedocument.wordprocessingml.document enum value to the request property

    • info

      added the new audio/mpeg enum value to the request property

    • info

      added the new audio/ogg enum value to the request property

    • info

      added the new audio/wav enum value to the request property

    • info

      added the new image/avif enum value to the request property

    • info

      added the new image/gif enum value to the request property

    • info

      added the new image/jpeg enum value to the request property

    • info

      added the new image/png enum value to the request property

    • info

      added the new image/svg+xml enum value to the request property

    • info

      added the new image/tiff enum value to the request property

    • info

      added the new image/webp enum value to the request property

    • info

      added the new text/c enum value to the request property

    • info

      added the new text/c++ enum value to the request property

    • info

      added the new text/css enum value to the request property

    • info

      added the new text/csv enum value to the request property

    • info

      added the new text/go enum value to the request property

    • info

      added the new text/html enum value to the request property

    • info

      added the new text/java enum value to the request property

    • info

      added the new text/javascript enum value to the request property

    • info

      added the new text/kotlin enum value to the request property

    • info

      added the new text/markdown enum value to the request property

    • info

      added the new text/perl enum value to the request property

    • info

      added the new text/php enum value to the request property

    • info

      added the new text/plain enum value to the request property

    • info

      added the new text/python enum value to the request property

    • info

      added the new text/ruby enum value to the request property

    • info

      added the new text/rust enum value to the request property

    • info

      added the new text/scala enum value to the request property

    • info

      added the new text/serialized-json enum value to the request property

    • info

      added the new text/sql enum value to the request property

    • info

      added the new text/swift enum value to the request property

    • info

      added the new text/toml enum value to the request property

    • info

      added the new text/typescript enum value to the request property

    • info

      added the new text/xml enum value to the request property

    • info

      added the new text/yaml enum value to the request property

    • info

      added the new video/mp4 enum value to the request property

    • info

      added the new video/webm enum value to the request property

    • info

      request property reactivated

    • info

      removed the sec-gemini/canvas enum value from the / response property for the response status

    • info

      removed the sec-gemini/code enum value from the / response property for the response status

    • info

      removed the sec-gemini/graph enum value from the / response property for the response status

    • info

      removed the sec-gemini/html enum value from the / response property for the response status

    • info

      removed the sec-gemini/image enum value from the / response property for the response status

    • info

      removed the sec-gemini/json enum value from the / response property for the response status

    • info

      removed the sec-gemini/markdown enum value from the / response property for the response status

    • info

      removed the sec-gemini/table enum value from the / response property for the response status

    • info

      removed the sec-gemini/timeline enum value from the / response property for the response status