Files

Upload a file

Files are used to upload documents that can be used with features like Deployments.

post/v2/files

Request body

filenamestring required

Name to store for the uploaded file, including extension when available.

contentstring bytes required

Base64-encoded file contents.

purpose'FILE_PURPOSE_UNSPECIFIED' | 'FILE_PURPOSE_RETRIEVAL' | 'FILE_PURPOSE_KNOWLEDGE_DATASOURCE' | 'FILE_PURPOSE_BATCH' | 'FILE_PURPOSE_CODE_INTERPRETER'
content_typestring

MIME type of the uploaded content, for example application/pdf.

project_idstring

Project the file is created in. Optional: project-scoped API keys default to the key's bound project; workspace-scoped callers default to the workspace's default project.

Response

OK

Changes

Changed in 7 of the 255 revisions of this API.347

  • 2f27caf6888c11See the full diff
    • added the new FILE_PURPOSE_CODE_INTERPRETER enum value to the file/allOf[File]/purpose response property for the response status 200

      response-property-enum-value-added

    • added the new FILE_PURPOSE_CODE_INTERPRETER enum value to the request property purpose

      request-property-enum-value-added

    This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • bee257c5b24811See the full diff
    • removed the enum value FILE_PURPOSE_CODE_INTERPRETER of the request property purpose

      request-property-enum-value-removed

    • removed the FILE_PURPOSE_CODE_INTERPRETER enum value from the file/allOf[File]/purpose response property for the response status 200

      response-property-enum-value-removed

    This revision also has 49 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 801f61a5a05611See the full diff
    • added the new FILE_PURPOSE_CODE_INTERPRETER enum value to the file/allOf[File]/purpose response property for the response status 200

      response-property-enum-value-added

    • added the new FILE_PURPOSE_CODE_INTERPRETER enum value to the request property purpose

      request-property-enum-value-added

    This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 42d5d206252711See the full diff
    • removed the enum value FILE_PURPOSE_CODE_INTERPRETER of the request property purpose

      request-property-enum-value-removed

    • removed the FILE_PURPOSE_CODE_INTERPRETER enum value from the file/allOf[File]/purpose response property for the response status 200

      response-property-enum-value-removed

    This revision also has 49 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 8ecb8a66eb1d11See the full diff
    • added the new FILE_PURPOSE_CODE_INTERPRETER enum value to the file/allOf[File]/purpose response property for the response status 200

      response-property-enum-value-added

    • added the new FILE_PURPOSE_CODE_INTERPRETER enum value to the request property purpose

      request-property-enum-value-added

    This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 5f95063ab4fd11See the full diff
    • removed the enum value FILE_PURPOSE_CODE_INTERPRETER of the request property purpose

      request-property-enum-value-removed

    • removed the FILE_PURPOSE_CODE_INTERPRETER enum value from the file/allOf[File]/purpose response property for the response status 200

      response-property-enum-value-removed

    This revision also has 43 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new FILE_PURPOSE_CODE_INTERPRETER enum value to the file/allOf[File]/purpose response property for the response status 200

      response-property-enum-value-added

    • added the new FILE_PURPOSE_CODE_INTERPRETER enum value to the request property purpose

      request-property-enum-value-added

    This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

Of the 255 revisions, 71 have no diff computed.