Create container file
FileCreateResponse containers().files().create(FileCreateParamsparams = FileCreateParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
POST/containers/{container_id}/files
Create a Container File
You can send either a multipart/form-data request with the raw file content, or a JSON request with a file ID.
Parameters
Returns
Create container file
package com.openai.example;
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.containers.files.FileCreateParams;
import com.openai.models.containers.files.FileCreateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
FileCreateResponse file = client.containers().files().create("container_id");
}
}{
"id": "id",
"bytes": 0,
"container_id": "container_id",
"created_at": 0,
"object": "container.file",
"path": "path",
"source": "source"
}Returns Examples
{
"id": "id",
"bytes": 0,
"container_id": "container_id",
"created_at": 0,
"object": "container.file",
"path": "path",
"source": "source"
}