# Delx Commerce — Rename Key in Object

> Delx Commerce — Rename Key in Object is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-01).

Renames a key within a JSON object from one name to another, returning the modified object with a renamed field.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/rename-key?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-rename-key-in-object-8e9c1191
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QrCdbbWVaFwYvxN255sZi

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 delx-commerce-rename-key-in-object-8e9c1191 -d '<json body>'
```

Example prompt: Can you rename the key 'user_id' to 'id' in this object: {"user_id": 42, "name": "Alice"}?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-use utility to rename a single key in a JSON object without setting up any infrastructure. It is ideal for agents that need quick, verifiable data normalization with no signup overhead and deterministic USDC micropayment pricing via x402 on Base or Solana.

## Known failure modes

- from_key not found in object — renamed may return false or the object is returned unchanged
- object field missing or null — operation may fail or return an error
- to_key already exists in the object — may cause collision or overwrite
- malformed input object — API returns an error response
- Payment failure via x402 — request is rejected before processing

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object containing the original object with the specified key renamed, a boolean 'renamed' field confirming the operation succeeded, and a schema identifier string 'delx/util-rename-key/v1'.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "object": {
   "type": "object",
   "description": "Input field: object."
  },
  "to_key": {
   "type": "string",
   "description": "Input field: to key."
  },
  "from_key": {
   "type": "string",
   "description": "Input field: from key."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "object": {
   "id": 1
  },
  "schema": "delx/util-rename-key/v1",
  "renamed": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-rename-key-in-object-8e9c1191/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
