parts.mjs 1.0 KB

12345678910111213141516171819202122
  1. // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
  2. import { APIResource } from "../../resource.mjs";
  3. import * as Core from "../../core.mjs";
  4. export class Parts extends APIResource {
  5. /**
  6. * Adds a
  7. * [Part](https://platform.openai.com/docs/api-reference/uploads/part-object) to an
  8. * [Upload](https://platform.openai.com/docs/api-reference/uploads/object) object.
  9. * A Part represents a chunk of bytes from the file you are trying to upload.
  10. *
  11. * Each Part can be at most 64 MB, and you can add Parts until you hit the Upload
  12. * maximum of 8 GB.
  13. *
  14. * It is possible to add multiple Parts in parallel. You can decide the intended
  15. * order of the Parts when you
  16. * [complete the Upload](https://platform.openai.com/docs/api-reference/uploads/complete).
  17. */
  18. create(uploadId, body, options) {
  19. return this._client.post(`/uploads/${uploadId}/parts`, Core.multipartFormRequestOptions({ body, ...options }));
  20. }
  21. }
  22. //# sourceMappingURL=parts.mjs.map