- Documentation
- API Reference
- POSTGet Model Parameters
- GETGet Prompt
- PUTUpdate Prompt
- DELDelete Prompt
- GETList Prompts
- POSTCreate Prompt
- GETList tools
- POSTCreates tool
- GETGet Tool
- PUTUpdate tool
- DELDelete tool
- GETList Evaluation Assertions
- POSTCreate Evaluation Assertion
- GETGet Evaluation Assertion
- PUTUpdate Evaluation Assertion
- DELDelete Evaluation Assertion
- GETList Evaluations
- POSTCreate Evaluation
- GETGet Evaluation
- PUTUpdate Evaluation
- DELDelete Evaluation
API Reference
List Prompts
Retrieve all prompts
curl --request GET \
--url https://api.promptfoundry.ai/sdk/v1/prompts
[
{
"id": "<string>",
"name": "<string>",
"parameters": {
"modelProvider": "ANTHROPIC",
"modelName": "<string>",
"responseFormat": "JSON",
"temperature": 123,
"topP": 123,
"frequencyPenalty": 123,
"presencePenalty": 123,
"maxTokens": 123,
"seed": 123,
"toolChoice": "<string>",
"stream": true,
"parallelToolCalls": true
},
"messages": [
{
"content": "<string>",
"role": "assistant",
"toolCallId": "<string>",
"toolCalls": [
{
"toolCallId": "<string>",
"type": "function",
"function": {
"arguments": "<string>",
"name": "<string>"
}
}
]
}
],
"tools": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"parameters": {}
}
]
}
]
Response
Example: "PROMPT_1"
Example: "Check the weather"
The provider of the provided model.
ANTHROPIC
, OPENAI
Example: "gpt-3.5-turbo"
Example: PromptResponseFormat.TEXT
JSON
, TEXT
Example: 1
Example: 1
Example: 0
Example: 0
Example: 100
Example: 97946543
The configured messages WITHOUT variables replaced.
Example: "Hello, {{city}}!"
assistant
, system
, tool
, user
TOOL_CALL_1
The type of the tool. Currently, only function
is supported.
function
The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
The name of the function to call.
The initial messages to be included with your call to the LLM API.
The name of the tool to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
A description of what the tool does, used by the model to choose when and how to call the tool.
The parameters the functions accepts, described as a JSON Schema object. This schema is designed to match the TypeScript Record<string, unknown>, allowing for any properties with values of any type.
curl --request GET \
--url https://api.promptfoundry.ai/sdk/v1/prompts
[
{
"id": "<string>",
"name": "<string>",
"parameters": {
"modelProvider": "ANTHROPIC",
"modelName": "<string>",
"responseFormat": "JSON",
"temperature": 123,
"topP": 123,
"frequencyPenalty": 123,
"presencePenalty": 123,
"maxTokens": 123,
"seed": 123,
"toolChoice": "<string>",
"stream": true,
"parallelToolCalls": true
},
"messages": [
{
"content": "<string>",
"role": "assistant",
"toolCallId": "<string>",
"toolCalls": [
{
"toolCallId": "<string>",
"type": "function",
"function": {
"arguments": "<string>",
"name": "<string>"
}
}
]
}
],
"tools": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"parameters": {}
}
]
}
]