# 24K Labs AI Automation Script Generator

> 24K Labs AI Automation Script Generator is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.35/call, status unknown (last checked 2026-10-27).

Generates a ready-to-run automation script from a code snippet or description, using Claude AI, paid per-request in USDC on Base L2

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/automation-script?utm_source=zero.xyz
- Price: $0.35/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-27
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/24k-labs-ai-automation-script-generator-dbd8aff9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Lyo4A6WDTYCgpRit-BObN

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 24k-labs-ai-automation-script-generator-dbd8aff9 -d '<json body>'
```

Example prompt: Take this Python snippet that checks a folder for new files and turn it into a complete automation script that also sends an email notification when a new file appears — language is Python.

## When to prefer this

Choose this endpoint when you need a pay-per-use, no-subscription AI service to generate complete, runnable automation scripts from code or descriptions — especially when you want to avoid API key management and pay only for what you use in USDC on Base L2. Best for agentic pipelines that need on-demand script generation without recurring SaaS costs.

## Known failure modes

- Missing or empty 'code' field returns an error or low-quality output
- Unsupported or ambiguous language value may cause incorrect code generation
- Network timeout if the Claude model is slow to respond
- Payment failure if USDC balance on Base L2 is insufficient (x402 payment required before response)
- Overly vague context may produce generic or non-functional scripts

## How this service works

Generate working automation scripts from natural language requirements.

## Output

Returns a JSON object containing the model used (e.g. claude-sonnet-4-5), the full generated automation script as a string (ready to run, including imports and boilerplate), and the number of tokens consumed by the request.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "code": {
   "type": "string",
   "description": "Primary input content"
  },
  "context": {
   "type": "string",
   "description": "Optional context or instructions"
  },
  "language": {
   "type": "string",
   "description": "Programming language (code services)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "claude-sonnet-4-5",
  "result": "#!/usr/bin/env python3\nimport watchdog, smtplib...",
  "tokens_used": 530
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/24k-labs-ai-automation-script-generator-dbd8aff9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
