curl --request POST \
--url https://api.getmaxim.ai/v1/prompts/run \
--header 'Content-Type: application/json' \
--header 'x-maxim-api-key: <api-key>' \
--data '{
"promptId": "<string>",
"versionId": "<string>",
"workspaceId": "<string>",
"messages": [
{
"role": "assistant",
"content": "<string>",
"tool_call_id": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
}
],
"modelName": "<string>",
"modelProvider": "openai",
"modelParameters": {
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {
"type": "<string>",
"properties": {},
"description": "<string>",
"items": "<any>",
"required": [
"<string>"
]
}
}
}
]
}
}'
{
"data": {
"output": "<any>",
"usage": {
"totalTokens": 123,
"promptTokens": 123,
"completionTokens": 123
}
}
}
Run a specific version of a prompt
curl --request POST \
--url https://api.getmaxim.ai/v1/prompts/run \
--header 'Content-Type: application/json' \
--header 'x-maxim-api-key: <api-key>' \
--data '{
"promptId": "<string>",
"versionId": "<string>",
"workspaceId": "<string>",
"messages": [
{
"role": "assistant",
"content": "<string>",
"tool_call_id": "<string>",
"tool_calls": [
{
"id": "<string>",
"type": "function",
"function": {
"name": "<string>",
"arguments": "<string>"
}
}
]
}
],
"modelName": "<string>",
"modelProvider": "openai",
"modelParameters": {
"tools": [
{
"type": "function",
"function": {
"name": "<string>",
"description": "<string>",
"parameters": {
"type": "<string>",
"properties": {},
"description": "<string>",
"items": "<any>",
"required": [
"<string>"
]
}
}
}
]
}
}'
{
"data": {
"output": "<any>",
"usage": {
"totalTokens": 123,
"promptTokens": 123,
"completionTokens": 123
}
}
}
API key for authentication
Prompt version executed successfully
The response is of type object
.
Was this page helpful?