# AES-256-GCM Encrypt

> AES-256-GCM Encrypt is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.016/call, status unknown (last checked 2026-09-14).

Encrypts a plaintext string using AES-256-GCM authenticated encryption, returning the IV, ciphertext, and authentication tag.

## Facts

- Endpoint: GET https://api.x402node.dev/crypto/aes-encrypt
- Price: $0.016/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-550e87c8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3pYBDY0mN_2hhfFV93tWz

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-x402node-dev-550e87c8
```

Example prompt: Encrypt the string 'Hello, World! This is my secret message.' using AES-256-GCM with the 32-byte key 'mySecretKey12345678901234567890ab' and give me back the IV, ciphertext, and auth tag.

## When to prefer this

Choose this endpoint when you need authenticated symmetric encryption (AES-256-GCM) via a simple API call without setting up a local crypto library. Ideal for AI agents in serverless or sandboxed environments that cannot execute native crypto code, or when you want a quick, pay-per-use encryption step in a data pipeline.

## Known failure modes

- Key is not exactly 32 bytes — returns 400 Bad Request
- Plaintext is missing or empty — returns 400 Bad Request
- Malformed request body — returns 400 or 422
- Payment not provided or insufficient — returns 402 Payment Required
- Server-side encryption error — returns 500 Internal Server Error

## How this service works

AES encryption, AES-256-GCM, symmetric encryption, authenticated encryption, data encryption, secure encryption, cipher, encrypt string. Encrypt plaintext using AES-256-GCM with a 32-byte key. Returns IV, ciphertext, and authentication tag.

## Output

Returns a JSON object containing the initialization vector (IV), the AES-256-GCM ciphertext (encrypted data), and the authentication tag — all necessary to later decrypt and verify the data using the same key.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "key"
     ],
     "properties": {
      "iv": {
       "type": "string",
       "description": "Init vector (hex) (optional)"
      },
      "key": {
       "type": "string",
       "description": "Key (hex) (required)"
      },
      "plaintext": {
       "type": "string",
       "description": "Text to encrypt (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-550e87c8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
