nips/104.md

30 lines
1.1 KiB
Markdown
Raw Normal View History

2023-07-03 09:37:37 -04:00
NIP-104
=======
Generative AI Prompt
--------------------
`draft` `optional` `author:vitorpamplona`
This NIP reserves `kind:1947` for Generated AI media prompts to be produced at the client side. It's expected that each viewer of this event will see a different media.
The prompt MUST be placed in the `.content`
```js
{
"id": "<32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>",
"pubkey": "<32-bytes lowercase hex-encoded public key of the event creator>",
"created_at": "<Unix timestamp in seconds>",
"kind": 1947,
"tags": [], // any relevant tags.
"content": "<Prompt to generate the image/video>"
}
```
Clients MAY choose when to generate the image and MAY add information to the prompt at will.
# Examples
A client can add a given style to the prompt to match their user interface. Others can add the user's language to produce the image with the appropriate translations. Clients can design galleries for the best prompt collections.
Supporting event kinds can accept a quoted `kind:1947` to be generated inside the rendering of that event.