canonical: https://jentic.com/apis/googleapis.com/datalabeling

# Google Data Labeling API

The Google Cloud Data Labeling API exposes the public surface of the Data Labeling Service for AI training data preparation. It covers 28 endpoints for creating datasets, importing raw data, requesting human-labeled annotations across image, video, and text tasks, and exporting annotated datasets back to Cloud Storage. The service is designed for teams who need labeled corpora for supervised ML model training but do not want to run their own annotation pipeline.

## For AI agents

Submit raw data to Google's Data Labeling Service, manage labeling jobs, and export human-labeled datasets for ML training. Lets agents drive a labeling pipeline without operating a workforce.

## Scope

Does not train ML models, run inference, or host model endpoints - use for dataset import, human-labeled annotation jobs, and labeled-data export only.

## Capabilities

- Create datasets and import images, video, or text from Cloud Storage
- Submit image, video, and text labeling jobs to Google's annotation workforce
- Track labeling job status, pause, resume, and cancel running jobs
- Export annotated datasets to Cloud Storage in standard ML training formats
- Define annotation specs and instruction documents that guide human labelers
- Inspect AnnotatedDatasets and individual examples to audit label quality

## Use cases

### Bootstrap a Supervised Training Dataset

Submit raw images, video, or text from Cloud Storage and receive a fully annotated dataset back, ready to train a Vertex AI or custom TensorFlow model. The API handles importData, requesting a labeling job with an annotation spec, and exportData when the job completes. End-to-end turnaround is typically days rather than the weeks needed to operate an in-house annotation team.

Example prompt: Create a dataset 'cat-dog-photos', import images from gs://acme-ml/raw/, submit an image classification labeling job with an annotation spec of CAT and DOG labels, and export the result when the job completes

### Active Learning Loop with Human Labels

Use the Data Labeling Service inside an active learning loop: a model identifies low-confidence predictions, those examples are submitted as a new labeling job, and the resulting AnnotatedDataset feeds back into model retraining. The API's pause/resume/cancel controls let the loop adjust labeling instructions or stop early if the model's accuracy plateaus.

Example prompt: Submit a labeling job for 500 low-confidence predictions exported by the previous training run, monitor the operation, and merge the new AnnotatedDataset into the existing dataset

### Audit and Export Labeled Datasets

Inspect existing annotated datasets to verify label coverage, sample examples, and confirm annotation spec consistency before exporting. The API exposes list and get operations on AnnotatedDatasets, Examples, and AnnotationSpecs, plus an exportData operation that writes results back to Cloud Storage in JSONL format. This supports compliance reviews and dataset versioning workflows.

Example prompt: List all AnnotatedDatasets under dataset 'cat-dog-photos', sample 10 examples from each, and exportData of the most recent annotated dataset to gs://acme-ml/labeled/v3/

### AI Agent Labeling Operator

An AI agent can drive the full label-train-evaluate loop through Jentic without operator intervention. Jentic search returns the right Data Labeling operation by intent, the agent loads the schema, and Jentic executes against datalabeling.googleapis.com using vault-stored credentials. This collapses a multi-day setup into a single agent run.

Example prompt: Use Jentic to search 'request an image labeling job', load the labelImage schema, and execute it for dataset 'cat-dog-photos' with classification config and basic-config containing the instruction URI

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1beta1/{+parent}/datasets | Create a labeling dataset |
| POST | /v1beta1/{+name}:importData | Import raw data from Cloud Storage |
| POST | /v1beta1/{+parent}/annotationSpecSets | Create an annotation spec set |
| POST | /v1beta1/{+name}:exportData | Export an annotated dataset to Cloud Storage |
| POST | /v1beta1/{+name}:pause | Pause a running labeling job |
| POST | /v1beta1/{+name}:resume | Resume a paused labeling job |

## Key resources

- **Datasets** — Create datasets and import raw images, video, or text from Cloud Storage
- **AnnotatedDatasets** — Annotated outputs of labeling jobs, with per-example annotations
- **AnnotationSpecSets** — Define the label set and metadata used by labeling jobs
- **Instructions** — Instruction documents shown to human labelers
- **Operations** — Long-running operations for label, import, and export calls
- **EvaluationJobs** — Continuous evaluation jobs that compare model predictions against labels

## Why Jentic

- **Setup:** Wiring the Data Labeling API by hand means setting up Google OAuth, refreshing short-lived scoped tokens rather than holding client secrets in code, and addressing dataset and job resources on datalabeling.googleapis.com. Through Jentic you install once, import the Data Labeling API from the API Directory, store the Google credential once, and your agent calls it.
- **Permission scoping:** The API carries the parent and resource name in the URL path (/v1beta1/{parent}/datasets and /v1beta1/{name}:importData), so a rule can pin your agent to one dataset or job. You choose the operations it may call, so it can import data and pause or resume a labeling job while export is not included unless you add it.
- **Credential handling:** Your Google OAuth credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'submit an image labeling job', and Jentic returns the matching Data Labeling operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Cloud AutoML API** — AutoML trains models on the labeled datasets that the Data Labeling Service produces.
- **Cloud Vision API** — Vision provides pretrained image classification and detection; Data Labeling produces custom labels for custom training.
- **Cloud Storage API** — Data Labeling reads input and writes exports to Cloud Storage; Storage holds the raw and labeled assets.

## FAQ

### What authentication does the Data Labeling API use?

The Data Labeling API uses OAuth 2.0 with the cloud-platform scope. Through Jentic the OAuth client and refresh tokens are stored in your Jentic One instance and the agent receives short-lived scoped tokens, so raw Google credentials never enter the agent context.

### Can I label images, video, and text with the Data Labeling API?

Yes. The API exposes labelImage, labelVideo, and labelText operations under the dataset resource, each accepting a labeling configuration (classification, bounding box, segmentation, entity extraction, sentiment) plus the annotation spec set and instruction URI. All three submit jobs to the same managed annotation workforce.

### What are the rate limits for the Data Labeling API?

Google enforces standard Cloud quotas: per-project rate limits on read/write calls and a quota on concurrent labeling jobs per project. Quotas are visible in the Cloud Console under IAM and admin, quotas, filtered to datalabeling.googleapis.com.

### How do I export a labeled dataset through Jentic?

Search Jentic for 'export an annotated dataset', load the schema for POST /v1beta1/{+name}:exportData, and execute with the AnnotatedDataset resource name and an outputConfig pointing at a Cloud Storage URI. Jentic returns the long-running operation name to poll.

### Is the Data Labeling API free?

The API itself is free; Google charges per-unit fees for human-labeled examples (per image, per video minute, per text segment), with separate tier pricing for tier-1 versus tier-2 labelers. Cloud Storage costs apply to imported and exported data.

### How do I pause a labeling job to fix instructions?

Call POST /v1beta1/{+name}:pause on the long-running operation associated with the labeling job. Update the Instruction document, then call POST /v1beta1/{+name}:resume to continue. Cancelled jobs cannot be resumed; only paused jobs can.

### Can I limit what my agent is allowed to do with the Data Labeling API?

Yes. Because you run Jentic One yourself, your own rules decide which Data Labeling operations and credentials the agent may use. Since the API carries the parent and resource name in the URL path, such as /v1beta1/{parent}/datasets and /v1beta1/{name}:importData, you can pin the agent to a single dataset or labeling job. You also choose the exact operations it may call, so it can import data and pause or resume a job while exportData stays off unless you add it.
