Scale AI ACTION
Create Image Annotation Task
Create an image annotation task. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Scale AI account once, then configure and run Create Image Annotation Task from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "scale_ai-create-image-annotation-task",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
scale_ai: { authProvisionId: "apn_xxxxxxx" },
project: "Project",
batch: "Batch",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "scale_ai-create-image-annotation-task",
"configured_props": {
"scale_ai": { "authProvisionId": "apn_xxxxxxx" },
"project": "Project",
"batch": "Batch"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "scale_ai",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "scale_ai-create-image-annotation-task",
arguments: {
project: "Project",
batch: "Batch",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
project Project | string | The name of the project to associate this task with. Optional Dynamic |
batch Batch | string | The name of the batch to associate this task with. Note that if a batch is specified, you need not specify the project, as the task will automatically be associated with the batch's project. For Scale Rapid projects specifying a batch is required. See Batches section for more details. Optional |
instruction Instruction | string | A markdown-enabled string or iframe embedded Google Doc explaining how to do the task. You can use markdown to show example images, give structure to your instructions, and more. See our instruction best practices for more details. For Scale Rapid projects, DO NOT set this field unless you specifically want to override the project level instructions. Optional |
callbackUrl Callback URL | string | The full url (including the scheme http:// or https://) or email address of the callback that will be used when the task is completed. Optional |
attachment Attachment | string | A URL to the image you'd like to be annotated. Required |
contextAttachments Context Attachments | string[] | An array of strings with links to actual attachments (A URI pointing to an attachment that provides additional context. Will be shown to the user below the main attachment, and can be made full screen.) to show to taskers as a reference. Context images themselves can not be labeled. Context images will appear like this in the UI. You cannot use the task's attachment url as a context attachment's url. Optional |
box Box | string | Parameters for box geometries. See Boxes for details about the parameter and response fields. Eg. {"min_height": 10, "min_width": 10, "can_rotate": true, "integer_pixels": true, "objects_to_annotate": ["car", "truck"]} Optional |
polygon Polygon | string | Parameters for polygon geometries. See Polygons for details about the parameter and response fields. Eg. {"min_vertices": 3, "max_vertices": 5, "objects_to_annotate": ["car", "truck"]} Optional |
line Line | string | Parameters for line geometries. See Lines for details about the parameter and response fields. Eg. {"min_vertices": 2, "max_vertices": 4, "objects_to_annotate": ["car", "truck"]} Optional |
point Point | string | Parameters for point geometries. See Points for details about the parameter and response fields. Eg. {"objects_to_annotate": ["car", "truck"]} Optional |
cuboid Cuboid | string | Parameters for cuboid geometries. See Cuboids for details about the parameter and response fields. Eg. {"min_height": 10, "min_width": 10, "camera_intrinsics": {"fx": 100, "fy": 100, "cx": 100, "cy": 100, "skew": 0, "scalefactor": 1}, "camera_rotation_quaternion": {"w": 1, "x": 0, "y": 0, "z": 0}, "camera_height": 100, "objects_to_annotate": ["car", "truck"]} Optional |
ellipse Ellipse | string | Parameters for ellipse geometries. See Ellipse for details about the parameter and response fields. Eg. {"objects_to_annotate": ["car", "truck"]} Optional |
padding Padding | integer | The amount of padding in pixels added to the top, bottom, left, and right of the image. This allows labelers to extend annotations outside of the image. When using padding, annotation coordinates can be a negative value or greater than the width/height of the image. See visual example. Optional |
baseAnnotations Base Annotations | object | Editable annotations, with the option to be locked, that a task should be initialized with. This is useful when you've run a model to prelabel the task and want annotators to refine those prelabels. Must contain the annotations field, which has the same format as the annotations field in the response. Optional |
canAddBaseAnnotations Can Add Base Annotations | boolean | Whether or not the tasker can add base annotations. Optional |
canEditBaseAnnotations Can Edit Base Annotations | boolean | Whether or not the tasker can edit base annotations. Optional |
canEditBaseAnnotationLabels Can Edit Base Annotation Labels | boolean | Whether or not the tasker can edit base annotation labels. Optional |
canDeleteBaseAnnotations Can Delete Base Annotations | boolean | Whether or not base_annotations can be removed from the task. If set to true, base_annotations can be deleted from the task. If set to false, base_annotations cannot be deleted from the task. Optional |
paddingX Padding X | integer | The amount of padding in pixels added to the left and right of the image. Overrides Padding if set. Optional |
paddingY Padding Y | integer | The amount of padding in pixels added to the top and bottom of the image. Overrides Padding if set. Optional |
priority Priority | integer | A value of 10, 20, or 30 that defines the priority of a task within a project. The higher the number, the higher the priority. Optional |
uniqueId Unique ID | string | A arbitrary ID that you can assign to a task and then query for later. This ID must be unique across all projects under your account, otherwise the task submission will be rejected. See Avoiding Duplicate Tasks for more details. Optional |
clearUniqueIdOnError Clear Unique ID On Error | boolean | If set to be true, if a task errors out after being submitted, the Unique ID on the task will be unset. This param allows workflows where you can re-submit the same unique id to recover from errors automatically. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- scale_ai-create-image-annotation-task
- Version
- 0.0.3
- App
- Scale AI
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗