Skip to content
API referenceGet a prompt

Get a prompt

GET/v1/prompts/{slug}

Get a prompt.

Returns the prompt with its default version: the one the production label points at, else the PUBLISHED version. Requires membership of the prompt's workspace (organization admins have it). 404 when the organization has no prompt with this slug.

Authorization

  • AuthorizationBearer va_

    A platform API key (va_...), created under Settings > API keys. Scoped to an organization or one workspace, with an admin or member role. Used by the management API.

Path parameters

  • slugstringrequired

    the prompt's slug

Query parameters

  • organizationstringrequired

    slug of the organization that owns it

Responses

200application/json
  • idstring

    The prompt's unique id (UUID).

  • slugstring

    The prompt's identifier in URLs and in the x-prompt-slug header. Generated at creation from the name (lower case, every run of other characters as one dash, at most 40 characters) plus a dash and 8 random hex characters, for example support-reply-3f9a1c2b. It never changes.

  • namestring

    Display name, unique within the organization.

  • descriptionstring

    Free-text description. Null when none is set.

  • organizationstring

    Slug of the organization that owns the prompt.

  • workspace_idstring<uuid>

    Id (UUID) of the workspace the prompt belongs to. Currently null when the prompt has no default version (published_version is null).

  • created_atstring<date-time>

    When the prompt was created (ISO 8601).

  • updated_atstring<date-time>

    When the prompt was created or its name or description last changed (ISO 8601).

  • published_versionobject

    A version of a prompt: the messages, model and parameters a completion uses. A version is never edited: each change is saved as a new version with the next number.

    Child attributes
    • idstring

      The version's unique id (UUID).

    • prompt_idstring

      Id (UUID) of the prompt the version belongs to.

    • version_numberinteger<int32>

      The version's number within the prompt, from 1, incremented by every save or rollback.

    • messagesobject[]

      The template messages, in order. A message's content may contain {{name}} placeholders.

      Child attributes
      • roleenum<string>required

        Who the message is from: system, user, assistant or tool (required).

        One of "system", "user", "assistant", "tool"

      • contentstringrequired

        The message text (required). Each {{name}} placeholder is replaced with the value of variable name when the prompt is rendered or run; a placeholder with no value is left as written.

    • modelstring

      The model completions use, for example gpt-4o. Null when none was set: a completion or test run must then send model_override.

    • temperaturenumber<double>

      Sampling temperature sent with every completion of this version. Null when not set (the provider's default applies).

    • max_tokensinteger<int32>

      Maximum number of tokens to generate, sent with every completion of this version. Null when not set.

    • top_pnumber<double>

      Nucleus-sampling value (top_p) sent with every completion of this version. Null when not set.

    • stopstring[]

      Stop sequences sent with every completion of this version. Null or empty when none.

    • variablesobject[]

      The variables the template declares. Descriptive only: rendering substitutes whichever variables a request sends.

      Child attributes
      • namestringrequired

        The variable's name, as written in {{name}} (required).

      • descriptionstring

        What the variable is for. Null when not given.

      • default_valuestring

        A suggested value. Informational: it is not substituted when a request leaves the variable out.

      • requiredboolean

        Whether callers are expected to supply the variable. Informational, not enforced. Default false.

    • toolsobject[]

      Tool definitions stored with the version. They are stored and returned, but completions of this prompt do not send them to the model.

      Child attributes
      • typestringrequired

        The tool type: function (required).

      • functionobjectrequired

        The function of a stored tool definition, in OpenAI's function-calling format.

        Child attributes
        • namestringrequired

          The function's name (required).

        • descriptionstring

          What the function does, for the model. Null when not given.

        • parametersmap<string, object>

          The function's parameters as a JSON Schema object. Null when not given.

    • statusenum<string>

      Lifecycle state: DRAFT (saved, never published), PUBLISHED (the prompt's published version; at most one at a time) or ARCHIVED (was the published version until another version was published).

      One of "DRAFT", "PUBLISHED", "ARCHIVED"

    • labelsstring[]

      Labels currently pointing at this version, for example production. Empty when none.

    • created_atstring<date-time>

      When the version was saved (ISO 8601).

    • created_bystring

      Identifier of the caller (user or API key) that saved the version, or unknown when the caller could not be identified.

NVIDIA Inception Program member

VectorAxis is built by GK Labs, a member of NVIDIA Inception.