# Create a new task definition for an account Creates a new task definition with specified model, and instructions for the task Endpoint: POST /accounts/{accountId}/task-definitions Version: 1.0.0 Security: bearerAuth ## Path parameters: - `accountId` (string, required) Short account ID with scd- prefix Example: "scd-k2j8n4m1" ## Request fields (application/json): - `modelId` (string, required) AI model to use for task execution Enum: "claude-4-sonnet", "gpt-4.1", "llama-4-maverick" - `name` (string, required) Name of the task definition Example: "Categorize Document" - `taskInstructions` (string, required) Instructions for executing the task Example: "We have received the following document. Please select its best appropriate category from the options in the ontology" - `primaryScope` (string, required) The type of object that will act as primary context for the task execution Enum: "content", "query", "dataspace" - `persistOutput` (boolean, required) Whether to persist the output of the task in the dataspace Example: true - `persistLogs` (boolean, required) Whether to persist logs of the task execution in the dataspace ## Response 201 fields (application/json): - `taskDefinitionId` (string, required) The UUID of the task definition Example: "550e8400-e29b-41d4-a716-446655440000" - `accountId` (string, required) Short account ID with scd- prefix Example: "scd-k2j8n4m1" - `modelId` (string, required) AI model to use for task execution Enum: "claude-4-sonnet", "gpt-4.1", "llama-4-maverick" - `name` (string, required) Name of the task definition Example: "Categorize Document" - `taskInstructions` (string, required) Instructions for executing the task Example: "We have received the following document. Please select its best appropriate category from the options in the ontology" - `primaryScope` (string, required) The type of object that will act as primary context for the task execution Enum: "content", "query", "dataspace" - `persistOutput` (boolean, required) Whether to persist the output of the task in the dataspace Example: true - `persistLogs` (boolean, required) Whether to persist logs of the task execution in the dataspace - `taskNameSlug` (string, required) URL-friendly version of the task name Example: "categorize-document" - `createdAt` (string, required) Example: "2024-01-15T10:30:00Z" - `lastUpdatedAt` (string,null, required) Example: "2024-01-15T14:30:00Z" ## Response 400 fields ## Response 404 fields