Create Batch
BatchCreateResponse batches().create(BatchCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v2/batches
Create Batch
package com.llamacloud_prod.api.example;
import com.llamacloud_prod.api.client.LlamaCloudClient;
import com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;
import com.llamacloud_prod.api.models.batches.BatchCreateParams;
import com.llamacloud_prod.api.models.batches.BatchCreateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();
BatchCreateParams params = BatchCreateParams.builder()
.config(BatchCreateParams.Config.builder()
.job(BatchCreateParams.Config.Job.builder()
.configurationId("cfg-PARSE_AGENTIC")
.type(BatchCreateParams.Config.Job.Type.PARSE_V2)
.build())
.build())
.sourceDirectoryId("dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
.build();
BatchCreateResponse batch = client.batches().create(params);
}
}{
"id": "id",
"config": {
"job": {
"configuration_id": "cfg-PARSE_AGENTIC",
"type": "parse_v2"
}
},
"project_id": "project_id",
"source_directory_id": "source_directory_id",
"status": "PENDING",
"created_at": "2019-12-27T18:11:19.117Z",
"results": [
{
"source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"error_message": "error_message",
"job_reference": {
"id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"type": "parse_v2"
}
}
],
"updated_at": "2019-12-27T18:11:19.117Z"
}Returns Examples
{
"id": "id",
"config": {
"job": {
"configuration_id": "cfg-PARSE_AGENTIC",
"type": "parse_v2"
}
},
"project_id": "project_id",
"source_directory_id": "source_directory_id",
"status": "PENDING",
"created_at": "2019-12-27T18:11:19.117Z",
"results": [
{
"source_directory_file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"error_message": "error_message",
"job_reference": {
"id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"type": "parse_v2"
}
}
],
"updated_at": "2019-12-27T18:11:19.117Z"
}