diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 8e7075f3..0112be77 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -6568,6 +6568,80 @@ components: required: - 'type' type: 'object' + ContainerFile: + properties: + bytes: + description: 'File size in bytes.' + example: 123 + type: 'integer' + container_id: + description: 'The container the file belongs to — echoes the `session_id` path parameter (OpenAI field name).' + example: 'sess-abc123' + type: 'string' + created_at: + description: 'Unix timestamp (seconds) when the file was last synced.' + example: 1755640000 + type: 'integer' + id: + description: 'Container file id: `cfile_` + base64url of the file path.' + example: 'cfile_b3V0L3JlcG9ydC5jc3Y' + type: 'string' + object: + enum: + - 'container.file' + example: 'container.file' + type: 'string' + path: + description: 'Session-relative file path inside the container.' + example: 'out/report.csv' + type: 'string' + source: + description: 'Container files are always produced by the assistant sandbox.' + enum: + - 'assistant' + example: 'assistant' + type: 'string' + required: + - 'id' + - 'object' + - 'container_id' + - 'bytes' + - 'created_at' + - 'path' + - 'source' + type: 'object' + ContainerFileListResponse: + properties: + data: + items: + $ref: '#/components/schemas/ContainerFile' + type: 'array' + first_id: + example: 'cfile_b3V0L3JlcG9ydC5jc3Y' + type: + - 'string' + - 'null' + has_more: + description: 'True when another page can be fetched by passing `after=last_id`.' + example: false + type: 'boolean' + last_id: + example: 'cfile_b3V0L3JlcG9ydC5jc3Y' + type: + - 'string' + - 'null' + object: + enum: + - 'list' + example: 'list' + type: 'string' + required: + - 'object' + - 'data' + - 'first_id' + - 'last_id' + - 'has_more' + type: 'object' ContainerReferenceEnvironment: description: 'Reference to a previously created container to reuse.' example: @@ -28703,6 +28777,336 @@ paths: summary: 'Task classification market share' tags: - 'Classifications' + /containers/{session_id}/files: + get: + description: 'Lists the files under a sandbox session prefix, in lexicographic path order. A restarted session is a separate container with its own session id. Paginate with `limit` and `after` (pass the previous page’s `last_id`); `has_more: true` always means the next page is fetchable that way.' + operationId: 'listContainerFiles' + parameters: + - description: 'The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.' + in: 'path' + name: 'session_id' + required: true + schema: + description: 'The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.' + example: 'sess-abc123' + type: 'string' + - description: 'Maximum number of files to return (1-1000). Defaults to 100 when absent.' + in: 'query' + name: 'limit' + required: false + schema: + default: 100 + description: 'Maximum number of files to return (1-1000). Defaults to 100 when absent.' + example: 100 + maximum: 1000 + minimum: 1 + type: 'integer' + - description: 'Forward cursor: a container file id from a previous page (typically `last_id`); listing resumes strictly after that file.' + in: 'query' + name: 'after' + required: false + schema: + description: 'Forward cursor: a container file id from a previous page (typically `last_id`); listing resumes strictly after that file.' + example: 'cfile_b3V0L3JlcG9ydC5jc3Y' + type: 'string' + responses: + '200': + content: + application/json: + example: + data: + - bytes: 123 + container_id: 'sess-abc123' + created_at: 1755640000 + id: 'cfile_b3V0L3JlcG9ydC5jc3Y' + object: 'container.file' + path: 'out/report.csv' + source: 'assistant' + first_id: 'cfile_b3V0L3JlcG9ydC5jc3Y' + has_more: false + last_id: 'cfile_b3V0L3JlcG9ydC5jc3Y' + object: 'list' + schema: + $ref: '#/components/schemas/ContainerFileListResponse' + description: 'The files in the container.' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '429': + content: + application/json: + example: + error: + code: 429 + message: 'Rate limit exceeded' + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: 'Too Many Requests - Rate limit exceeded' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '503': + content: + application/json: + example: + error: + code: 503 + message: 'Service temporarily unavailable' + schema: + $ref: '#/components/schemas/ServiceUnavailableResponse' + description: 'Service Unavailable - Service temporarily unavailable' + summary: 'List container files' + tags: + - 'Containers' + x-hidden: true + /containers/{session_id}/files/{file_id}: + get: + description: 'Returns the metadata of a single file under a sandbox session prefix.' + operationId: 'getContainerFile' + parameters: + - description: 'The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.' + in: 'path' + name: 'session_id' + required: true + schema: + description: 'The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.' + example: 'sess-abc123' + type: 'string' + - description: 'Container file id (`cfile_` + base64url of the file path).' + in: 'path' + name: 'file_id' + required: true + schema: + description: 'Container file id (`cfile_` + base64url of the file path).' + example: 'cfile_b3V0L3JlcG9ydC5jc3Y' + type: 'string' + responses: + '200': + content: + application/json: + example: + bytes: 123 + container_id: 'sess-abc123' + created_at: 1755640000 + id: 'cfile_b3V0L3JlcG9ydC5jc3Y' + object: 'container.file' + path: 'out/report.csv' + source: 'assistant' + schema: + $ref: '#/components/schemas/ContainerFile' + description: 'The container file.' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '429': + content: + application/json: + example: + error: + code: 429 + message: 'Rate limit exceeded' + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: 'Too Many Requests - Rate limit exceeded' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '503': + content: + application/json: + example: + error: + code: 503 + message: 'Service temporarily unavailable' + schema: + $ref: '#/components/schemas/ServiceUnavailableResponse' + description: 'Service Unavailable - Service temporarily unavailable' + summary: 'Retrieve a container file' + tags: + - 'Containers' + x-hidden: true + /containers/{session_id}/files/{file_id}/content: + get: + description: 'Streams the raw bytes of a file under a sandbox session prefix.' + operationId: 'downloadContainerFileContent' + parameters: + - description: 'The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.' + in: 'path' + name: 'session_id' + required: true + schema: + description: 'The sandbox session id, exactly as stored — a restarted session has its own `-r`-suffixed id.' + example: 'sess-abc123' + type: 'string' + - description: 'Container file id (`cfile_` + base64url of the file path).' + in: 'path' + name: 'file_id' + required: true + schema: + description: 'Container file id (`cfile_` + base64url of the file path).' + example: 'cfile_b3V0L3JlcG9ydC5jc3Y' + type: 'string' + responses: + '200': + content: + application/octet-stream: + example: 'binary file contents' + schema: + format: 'binary' + type: 'string' + description: 'The raw file content.' + '400': + content: + application/json: + example: + error: + code: 400 + message: 'Invalid request parameters' + schema: + $ref: '#/components/schemas/BadRequestResponse' + description: 'Bad Request - Invalid request parameters or malformed input' + '401': + content: + application/json: + example: + error: + code: 401 + message: 'Missing Authentication header' + schema: + $ref: '#/components/schemas/UnauthorizedResponse' + description: 'Unauthorized - Authentication required or invalid credentials' + '403': + content: + application/json: + example: + error: + code: 403 + message: 'Only management keys can perform this operation' + schema: + $ref: '#/components/schemas/ForbiddenResponse' + description: 'Forbidden - Authentication successful but insufficient permissions' + '404': + content: + application/json: + example: + error: + code: 404 + message: 'Resource not found' + schema: + $ref: '#/components/schemas/NotFoundResponse' + description: 'Not Found - Resource does not exist' + '429': + content: + application/json: + example: + error: + code: 429 + message: 'Rate limit exceeded' + schema: + $ref: '#/components/schemas/TooManyRequestsResponse' + description: 'Too Many Requests - Rate limit exceeded' + '500': + content: + application/json: + example: + error: + code: 500 + message: 'Internal Server Error' + schema: + $ref: '#/components/schemas/InternalServerResponse' + description: 'Internal Server Error - Unexpected server error' + '503': + content: + application/json: + example: + error: + code: 503 + message: 'Service temporarily unavailable' + schema: + $ref: '#/components/schemas/ServiceUnavailableResponse' + description: 'Service Unavailable - Service temporarily unavailable' + summary: 'Download container file content' + tags: + - 'Containers' + x-hidden: true /credits: get: description: 'Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.' @@ -39032,6 +39436,8 @@ tags: name: 'Chat' - description: 'Task classification market-share endpoints' name: 'Classifications' + - description: 'Containers endpoints' + name: 'Containers' - description: 'Credit management endpoints' name: 'Credits' - description: 'Public OpenRouter usage datasets. Data returned by these endpoints is licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/): reuse and republish it, including commercially, with attribution to OpenRouter.'