POST
/
v1
/
prompt
curl --request POST \
  --url https://api.getscorecard.ai/v1/prompt \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "name": "Prompt Name",
  "description": "Description of the prompt",
  "prompt_template": "<system>\nYou are a helpful assistant. Use the provided context to answer the user'\''s query.\n\nContext: {context}\n</system>\n\n<user>\n{user_query}\n</user>",
  "model_params": {
    "param1": "value1",
    "param2": 0.1,
    "param3": 100,
    "param4": true
  },
  "tag": "1.0",
  "project_id": "1"
}'
{
  "org_id": "<string>",
  "user_id": "<string>",
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "is_archived": true,
  "prompt_template": "<string>",
  "model_params": {},
  "root_id": "<string>",
  "parent_id": "<string>",
  "merge_parent_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "project_id": 1
}

Authorizations

X-API-Key
string
header
required

Body

application/json

The parameters to create a new prompt.

prompt_template
string
required
name
string | null
parent_id
string | null
description
string | null
model_params
object | null
tag
string | null
is_prod
boolean | null
default:
false
project_id
integer | null

Response

200
application/json
Successful Response
org_id
string | null

The organization this resource belongs to.

user_id
string | null

The user this record belongs to.

id
string | null
name
string | null
description
string | null
is_archived
boolean | null
default:
false
prompt_template
string | null
model_params
object | null
root_id
string | null
parent_id
string | null
merge_parent_id
string | null
created_at
string | null
project_id
integer | null

The ID of the project the prompt belongs to.