<?php
namespace boru\boruai\Openai\Api\Endpoints;

use boru\boruai\Openai\OpenAI;

class UploadsAPI {
    public static function create($parameters=[]) {
        return OpenAI::request("post","uploads",$parameters);
    }
    public static function addPart($upload_id,$parameters=[]) {
        return OpenAI::upload("uploads/".$upload_id."/parts",$parameters);
    }

    public static function complete($upload_id,$parameters=[]) {
        return OpenAI::request("post","uploads/".$upload_id."/complete",$parameters);
    }

    public static function cancel($upload_id) {
        return OpenAI::request("post","uploads/".$upload_id."/cancel");
    }
}