Maxim Logo
Prompts/Versions

Create a prompt version

Create a prompt version

POST
/v1/prompts/versions

Authorization

x-maxim-api-key<token>

API key for authentication

In: header

Request Body

application/jsonOptional
promptIdRequiredstring

Prompt identifier

descriptionRequiredstring

Version description

modelNameRequiredstring

Name of the model

modelProviderRequiredstring

Provider of the model

Value in: "openai" | "azure" | "huggingface" | "anthropic" | "together" | "google" | "groq" | "bedrock" | "maxim" | "cohere" | "ollama" | "xai"
messagesRequiredarray<object>

Array of messages

modelParametersobject

Model parameters

Default: {}
curl -X POST "https://api.getmaxim.ai/v1/prompts/versions" \
  -H "x-maxim-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "promptId": "string",
    "description": "string",
    "modelName": "string",
    "modelProvider": "openai",
    "messages": [
      {
        "role": "assistant",
        "content": "string"
      }
    ],
    "modelParameters": {}
  }'

Prompt version created successfully

{
  "data": {
    "id": "string",
    "version": 0,
    "description": "string",
    "promptId": "string",
    "config": {
      "model": "string",
      "author": {
        "id": "string",
        "name": "string",
        "email": "string",
        "image": "string"
      },
      "messages": [
        {
          "id": "string",
          "index": 0,
          "payload": {
            "role": "string",
            "content": "string"
          },
          "currentType": "string",
          "originalType": "string"
        }
      ],
      "provider": "string",
      "modelParameters": {
        "top_p": 0,
        "max_tokens": 0,
        "promptTools": [
          null
        ],
        "temperature": 0,
        "image_detail": {
          "detail": "string"
        },
        "response_format": {
          "type": "string"
        },
        "frequency_penalty": 0
      }
    },
    "createdAt": "string",
    "updatedAt": "string",
    "deletedAt": "string"
  }
}