openapi: 3.2.0 info: title: AutoGPT Agent Server Files API summary: AutoGPT Agent Server description: This server is used to execute agents that are created by the AutoGPT system. version: '0.1' tags: - name: Files paths: /api/files/upload: post: tags: - Files summary: Upload file to cloud storage description: 'Upload a file to cloud storage and return a storage key that can be used with FileStoreBlock and AgentFileInputBlock. Args: file: The file to upload user_id: The user ID provider: Cloud storage provider ("gcs", "s3", "azure") expiration_hours: Hours until file expires (1-48) Returns: Dict containing the cloud storage path and signed URL' operationId: postV1UploadFileToCloudStorage security: - HTTPBearerJWT: [] parameters: - name: expiration_hours in: query required: false schema: type: integer default: 24 title: Expiration Hours requestBody: required: true content: multipart/form-data: schema: $ref: '#/components/schemas/Body_postV1Upload_file_to_cloud_storage' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/backend__api__model__UploadFileResponse' '401': $ref: '#/components/responses/HTTP401NotAuthenticatedError' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' x-operation-id-source: normalized x-operation-id-original: postV1Upload file to cloud storage components: responses: HTTP401NotAuthenticatedError: description: Authentication required content: application/json: schema: type: object properties: detail: type: string schemas: Body_postV1Upload_file_to_cloud_storage: properties: file: type: string format: binary title: File type: object required: - file title: Body_postV1Upload file to cloud storage HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError backend__api__model__UploadFileResponse: properties: file_uri: type: string title: File Uri file_name: type: string title: File Name size: type: integer title: Size content_type: type: string title: Content Type expires_in_hours: type: integer title: Expires In Hours type: object required: - file_uri - file_name - size - content_type - expires_in_hours title: UploadFileResponse ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type input: title: Input ctx: type: object title: Context type: object required: - loc - msg - type title: ValidationError securitySchemes: APIKeyAuthenticator-X-Postmark-Webhook-Token: type: apiKey in: header name: X-Postmark-Webhook-Token HTTPBearer: type: http scheme: bearer HTTPBearerJWT: type: http scheme: bearer bearerFormat: jwt