# Nostr Key/Identifier Converter

> Nostr Key/Identifier Converter is a paid API for AI agents from nostr.halowerk.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Converts any NIP-19 bech32 identifier or 64-character hex value into all of its equivalent representations, including TLV-decoded relay hints, author, and kind fields.

## Facts

- Endpoint: POST https://nostr.halowerk.com/key-convert
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nostr-key-identifier-converter-2e592913
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_mcmWnIgbsOB8zCL_JEzo9

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 nostr-key-identifier-converter-2e592913 -d '<json body>'
```

Example prompt: Convert this nostr nprofile identifier nprofile1qqsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8gpp4mhxue69uhhytnc9e3k7mgpz4mhxue69uhky6t5vdhkjm3prfmhxue69uhkummnw3ez6ur4vgh8wetvd3hhyer9wghxuet5nxnepm to hex and give me all the relay hints and author pubkey it contains.

## When to prefer this

Use this endpoint whenever you need to translate between Nostr identifier formats — especially when you need the full TLV payload (relay hints, author, kind) from an nprofile or nevent that simpler converters discard. Prefer it over generic bech32 libraries when relay-targeted follow-up queries depend on those embedded hints.

## Known failure modes

- Invalid or malformed bech32 string returns an error indicating the identifier could not be parsed
- Hex string of wrong length (not 64 characters) returns a validation error
- Unsupported NIP-19 prefix returns an error
- Network or server error returns HTTP 5xx

## How this service works

Takes any public NIP-19 identifier or a 64-character hex value and returns every representation it can be expressed as. A decoded nprofile or nevent yields not only the key or event id but also the relay hints, the author and the kind that the TLV form carries — precisely the fields that make a follow-up query targeted, and precisely what is lost by code that only handles npub.

## Output

A JSON object containing all possible representations of the input identifier: hex and bech32 forms (npub/nsec/note/nprofile/nevent as applicable), plus TLV-decoded fields such as relay hints (array of relay URLs), author public key (hex), and event kind (integer) when the input encodes them.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "kind": {
   "type": "integer",
   "maximum": 65535,
   "minimum": 0,
   "description": "Event kind for the generated nevent or naddr."
  },
  "input": {
   "type": "string",
   "description": "npub, note, nprofile, nevent, naddr, or 64 hex characters."
  },
  "assume": {
   "enum": [
    "pubkey",
    "event_id",
    "both"
   ],
   "type": "string",
   "default": "both",
   "description": "How to read bare hex. Ignored for bech32 input, which is unambiguous."
  },
  "author": {
   "type": "string",
   "description": "Author public key as hex or npub, for building an nevent or naddr."
  },
  "relays": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "maxItems": 8,
   "description": "wss relay hints to embed in the generated nprofile, nevent or naddr."
  },
  "identifier": {
   "type": "string",
   "maxLength": 200,
   "description": "The d tag value for building an naddr. Requires author and kind."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nostr-key-identifier-converter-2e592913/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nostr.halowerk.com](https://www.zero.xyz/host/nostr.halowerk.com/llms.txt)
