POST
/
v1
/
prompts
/
versions
curl --request POST \
  --url https://api.getmaxim.ai/v1/prompts/versions \
  --header 'Content-Type: application/json' \
  --header 'x-maxim-api-key: <api-key>' \
  --data '{
  "promptId": "<string>",
  "description": "<string>",
  "modelName": "<string>",
  "modelProvider": "openai",
  "messages": [
    {
      "role": "assistant",
      "content": "<string>"
    }
  ],
  "modelParameters": {}
}'
{
  "data": {
    "id": "<string>",
    "version": 123,
    "description": "<string>",
    "promptId": "<string>",
    "config": {
      "model": "<string>",
      "author": {
        "id": "<string>",
        "name": "<string>",
        "email": "<string>",
        "image": "<string>"
      },
      "messages": [
        {
          "id": "<string>",
          "index": 123,
          "payload": {
            "role": "<string>",
            "content": "<string>"
          },
          "currentType": "<string>",
          "originalType": "<string>"
        }
      ],
      "provider": "<string>",
      "modelParameters": {
        "top_p": 123,
        "max_tokens": 123,
        "promptTools": [
          "<any>"
        ],
        "temperature": 123,
        "image_detail": {
          "detail": "<string>"
        },
        "response_format": {
          "type": "<string>"
        },
        "frequency_penalty": 123
      }
    },
    "createdAt": "<string>",
    "updatedAt": "<string>",
    "deletedAt": "<string>"
  }
}

Authorizations

x-maxim-api-key
string
header
required

API key for authentication

Body

application/json
promptId
string
required

Prompt identifier

description
string
required

Version description

modelName
string
required

Name of the model

modelProvider
enum<string>
required

Provider of the model

Available options:
openai,
azure,
huggingface,
anthropic,
together,
google,
groq,
bedrock,
maxim,
cohere,
ollama,
xai
messages
object[]
required

Array of messages

Message object

modelParameters
object

Model parameters

Response

200
application/json
Prompt version created successfully
data
object
required