POST
/
apps
/
{appSlug}
/
prompts
curl --request POST \
  --url https://api-v2.autoblocks.ai/apps/{appSlug}/prompts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": "soap-note-generator",
  "templates": [
    {
      "id": "template-1",
      "template": "Hi {{name}}"
    }
  ],
  "params": {
    "temperature": 0.5,
    "topP": 0.5,
    "topK": 10,
    "frequencyPenalty": 0.5,
    "presencePenalty": 0.5,
    "maxTokens": 100,
    "responseFormat": {
      "type": "json_object"
    },
    "stopSequences": [
      "<|endoftext|>"
    ],
    "model": "gpt-4o"
  }
}'
{
  "id": "<string>",
  "version": "<string>",
  "revisionId": "<string>",
  "templates": [
    {
      "id": "<string>",
      "template": "<string>"
    }
  ],
  "tools": [
    {}
  ],
  "toolsParams": [
    {
      "name": "<string>",
      "params": [
        "<string>"
      ]
    }
  ],
  "params": {
    "params": {}
  }
}

Authorizations

Authorization
string
header
required

API Key created in the Autoblocks Webapp

Path Parameters

appSlug
string
required

Body

application/json

Response

200 - application/json

The prompt was created successfully

The response is of type object.