# Create work item Creates a new billable work item. Endpoint: POST /work_items Version: 1.0.0 Security: ApiKeyAuth, OrgIdAuth ## Request fields (application/json): - `agentId` (string) Agent that performed the work - `jobId` (string) Associated job if applicable - `type` (string, required) Type of work performed Enum: "model_call", "knowledge_call", "skill_call", "job_task" - `description` (string) Work description - `timeSpent` (string, required) Time spent in hours (decimal) Example: "0.25" - `humanInLoop` (boolean) Whether human intervention was required - `metadata` (object) Additional metadata ## Response 201 fields (application/json): - `workItem` (object) - `workItem.id` (string, required) Unique identifier for the work item - `workItem.orgId` (string, required) Organization ID - `workItem.agentId` (string,null) Agent that performed the work - `workItem.jobId` (string,null) Associated job if applicable - `workItem.type` (string, required) Type of work performed Enum: "model_call", "knowledge_call", "skill_call", "job_task" - `workItem.description` (string) Work description Example: "Customer support chat" - `workItem.timeSpent` (string, required) Time spent in hours (decimal) Example: "0.5" - `workItem.humanInLoop` (boolean) Whether human intervention was required - `workItem.metadata` (object,null) Additional metadata Example: {"modelName":"gpt-4","tokensUsed":1500} - `workItem.createdAt` (string) ## Response 400 fields (application/json): - `error` (string) Error message Example: "Missing required headers" - `details` (string) Additional error details Example: "x-api-key and x-org-id headers are required" ## Response 401 fields (application/json): - `error` (string) Error message Example: "Missing required headers" - `details` (string) Additional error details Example: "x-api-key and x-org-id headers are required"