Skip to main content

Method

Retrieves detailed information about a specific batch job, including its current state, progress, and results.
string
required
The resource name or ID of the batch job:
  • Vertex AI: projects/{project}/locations/{location}/batchPredictionJobs/{job_id} or just the {job_id} if project/location are set
  • Gemini API: batches/{batch_id} or just the {batch_id}
GetBatchJobConfig
Optional configuration for the request

Response

string
The resource name of the batch job
string
Display name of the batch job
JobState
Current state of the batch job:
  • JOB_STATE_QUEUED: Waiting to start
  • JOB_STATE_PENDING: Preparing to run
  • JOB_STATE_RUNNING: Currently processing
  • JOB_STATE_SUCCEEDED: Completed successfully
  • JOB_STATE_FAILED: Failed with errors
  • JOB_STATE_CANCELLED: Cancelled by user
string
ISO 8601 timestamp when the job was created
string
ISO 8601 timestamp when the job started processing
string
ISO 8601 timestamp when the job completed
string
ISO 8601 timestamp of the last update
string
The model being used for predictions
BatchJobSource
Source configuration (Vertex AI only)
BatchJobDestination
Destination configuration with output location
object
Statistics about completed requests (Vertex AI only)
object
Error information if the job failed

Usage

Check Job Status

Monitor Progress with Polling

Retrieve Inline Results (Gemini API)

Download Results from GCS (Vertex AI)

Check Job with Detailed Stats

Handle Different Job States

Notes

  • Job information is updated as the batch processes
  • Completion stats are only available on Vertex AI
  • Inline responses are only available on Gemini API
  • Output files remain available even after job completion
  • Use polling with reasonable intervals (30-60 seconds) to check progress

See Also