Hanzo
OpenapiPrompt

Get returns one of the caller org's prompts: its CURRENT template text plus the…

Get returns one of the caller org's prompts: its CURRENT template text plus the metadata of every version it has had.

GET /v1/prompt/{name}

Addresshttps://api.hanzo.ai/v1/prompt/{name}
MethodGET
Operationget_prompt_by_name
AuthAuthorization: Bearer $HANZO_API_KEY

Get returns one of the caller org's prompts: its CURRENT template text plus the metadata of every version it has had. The history carries version numbers, types and timestamps only — not each version's body — so a long history cannot inflate this response. A name the caller's org does not own is 404, whoever owns it.

Request

1 field.

FieldInTypeRequiredDescription
namepathstringyesName is the prompt to act on, from the path.

Response

StatusBodyMeaning
200promptDetailok

200 body — 12 fields.

FieldInTypeAlwaysDescription
createdAtbodystringCreatedAt is when version 1 was written, RFC 3339 UTC.
labelsbodystring[]Labels is the current version's free-form taxonomy.
lastUpdatedAtbodystringUpdatedAt is when the current version was appended, RFC 3339 UTC.
namebodystringName is the prompt's org-unique handle and the URL segment it is addressed by.
promptbodystringPrompt is the CURRENT version's template body — the only content this service returns.
tagsbodystring[]Tags is the second free-form taxonomy, same rules as Labels.
typebodystringType labels the current version's kind; "text" unless the creator said otherwise.
versionbodyintegerVersion is the current version number, starting at 1 and incremented by one on every create against an existing name.
versionHistorybodyversionView[]Versions is the history METADATA, newest first, capped at the last 100 — no bodies, so a long history cannot inflate this response.
versionHistory[].createdAtbodystringCreatedAt is when this revision was appended, RFC 3339 UTC.
versionHistory[].typebodystringType is the kind this revision was written with, which may differ from the current one.
versionHistory[].versionbodyintegerVersion is this revision's number, 1 for the first.

Failure carries the platform error shape — see Errors.

Examples

hanzo prompts get <name>

Prompt API · All Hanzo APIs · Interactive reference

How is this guide?

On this page