# Dockerfile Generator (api.strale.io)

> Dockerfile Generator (api.strale.io) is a paid API for AI agents from api.strale.io, paid per call via x402, $0.054001/call, status unknown (last checked 2026-09-14).

Generates optimized, production-ready Dockerfiles with multi-stage builds, Alpine base, non-root user, and layer caching for Node, Python, Go, Rust, and Java.

## Facts

- Endpoint: GET https://api.strale.io/x402/dockerfile-generate
- Price: $0.054001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 2
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-5998c132
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YpJnk0P1DDqvciERQH1ug

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 api-strale-io-5998c132
```

Example prompt: Generate an optimized production-ready Dockerfile for a Node.js Express app — use Alpine base, enable multi-stage builds, and make sure it runs as a non-root user.

## When to prefer this

Use this endpoint when you need a best-practice, production-hardened Dockerfile quickly without manually writing one — especially when security (non-root), image size (Alpine), build speed (layer caching), or CI/CD readiness (multi-stage) are priorities. Prefer this over generic LLM Dockerfile generation when you want a consistently structured, opinionated output for a known language stack.

## Known failure modes

- Missing required 'language' query parameter returns a 400 error
- Unsupported language value returns an error indicating supported languages (Node, Python, Go, Rust, Java)
- Payment not completed or invalid x402 payment header results in 402 Payment Required
- Service unavailable returns a 5xx error

## How this service works

Generate optimized, production-ready Dockerfiles. Multi-stage builds, Alpine base, non-root user, layer caching. Supports Node, Python, Go, Rust, Java.

## Output

Returns a complete, production-ready Dockerfile as text, incorporating multi-stage build patterns, Alpine base images for minimal footprint, non-root user configuration for security, and optimized layer caching instructions tailored to the specified language and framework.

## Example request

```json
{
 "alpine": true,
 "language": "Node",
 "framework": "Express",
 "multi_stage": true
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "language"
     ],
     "properties": {
      "alpine": {
       "type": "boolean"
      },
      "language": {
       "type": "string"
      },
      "framework": {
       "type": "string"
      },
      "multi_stage": {
       "type": "boolean"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-5998c132/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
