{"openapi":"3.0.0","info":{"title":"Prompt Foundry API","version":"1.0.0","description":"The API for managing prompts, tools, evaluations, and evaluation assertions."},"servers":[{"url":"https://api.promptfoundry.ai","description":"Prompt Foundry Production API"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"LLMProviders":{"type":"string","enum":["ANTHROPIC","OPENAI"],"description":"The LLM model provider."},"TextContentBlock":{"type":"object","properties":{"type":{"type":"string","enum":["TEXT"]},"text":{"type":"string"}},"required":["type","text"],"title":"TextContentBlock"},"ImageBase64ContentBlock":{"type":"object","properties":{"type":{"type":"string","enum":["IMAGE_BASE64"]},"imageBase64":{"type":"string"},"mediaType":{"type":"string"}},"required":["type","imageBase64","mediaType"],"title":"ImageBase64ContentBlock"},"ToolFunctionCall":{"type":"object","properties":{"toolCallId":{"type":"string","description":"TOOL_CALL_1"},"type":{"type":"string","enum":["function"],"description":"The type of the tool. Currently, only `function` is supported."},"function":{"type":"object","properties":{"arguments":{"type":"string","description":"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."},"name":{"type":"string","description":"The name of the function to call."}},"required":["arguments","name"]}},"required":["toolCallId","type","function"]},"ToolCallContentBlock":{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALL"]},"toolCall":{"$ref":"#/components/schemas/ToolFunctionCall"}},"required":["type","toolCall"],"title":"ToolCallContentBlock"},"ToolResultContentBlock":{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_RESULT"]},"toolCallId":{"type":"string"},"result":{"type":"string"}},"required":["type","toolCallId","result"],"title":"ToolResultContentBlock"},"MessageContentBlockSchema":{"oneOf":[{"$ref":"#/components/schemas/TextContentBlock"},{"$ref":"#/components/schemas/ImageBase64ContentBlock"},{"$ref":"#/components/schemas/ToolCallContentBlock"},{"$ref":"#/components/schemas/ToolResultContentBlock"}],"discriminator":{"propertyName":"type","mapping":{"TEXT":"#/components/schemas/TextContentBlock","IMAGE_BASE64":"#/components/schemas/ImageBase64ContentBlock","TOOL_CALL":"#/components/schemas/ToolCallContentBlock","TOOL_RESULT":"#/components/schemas/ToolResultContentBlock"}}},"PromptMessageRole":{"type":"string","enum":["assistant","system","tool","user"]},"ConversationMessage":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/MessageContentBlockSchema"}},"role":{"$ref":"#/components/schemas/PromptMessageRole"}},"required":["content","role"]},"ToolParameters":{"type":"object","additionalProperties":{"nullable":true},"description":"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."},"PromptConfiguration":{"type":"object","properties":{"id":{"type":"string","description":"Example: \"PROMPT_1\""},"name":{"type":"string","description":"Example: \"Check the weather\""},"parameters":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/LLMProviders"},"name":{"type":"string","description":"The name of the model for the provider."},"responseFormat":{"type":"string","enum":["JSON","TEXT"],"description":"Example: PromptResponseFormat.TEXT"},"temperature":{"type":"number","description":"Example: 1"},"topP":{"type":"number","description":"Example: 1"},"topK":{"type":"number","nullable":true,"minimum":1,"description":"Example: 50"},"frequencyPenalty":{"type":"number","description":"Example: 0"},"presencePenalty":{"type":"number","description":"Example: 0"},"maxTokens":{"type":"number","nullable":true,"description":"Example: 100"},"seed":{"type":"number","nullable":true,"description":"Example: 97946543"},"toolChoice":{"type":"string","nullable":true},"stream":{"type":"boolean"},"parallelToolCalls":{"type":"boolean"}},"required":["provider","name","responseFormat","temperature","topP","topK","frequencyPenalty","presencePenalty","maxTokens","seed","toolChoice","stream","parallelToolCalls"]},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"},"description":"The configured messages WITHOUT variables replaced."},"tools":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The initial messages to be included with your call to the LLM API."},"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"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."},"description":{"type":"string","description":"A description of what the tool does, used by the model to choose when and how to call the tool."},"parameters":{"$ref":"#/components/schemas/ToolParameters"}},"required":["id","name","description","parameters"]}}},"required":["id","name","parameters","messages","tools"]},"PromptMessage":{"allOf":[{"$ref":"#/components/schemas/ConversationMessage"},{"type":"object","properties":{"promptMessageId":{"type":"string"}},"required":["promptMessageId"]}]},"Tool":{"type":"object","properties":{"id":{"type":"string","description":"The initial messages to be included with your call to the LLM API."},"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"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."},"description":{"type":"string","description":"A description of what the tool does, used by the model to choose when and how to call the tool."},"parameters":{"$ref":"#/components/schemas/ToolParameters"}},"required":["id","name","description","parameters"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string","description":"Example: \"Prompt ID is required.\""}},"required":["error"]},"PromptBody":{"type":"object","properties":{"name":{"type":"string"},"tools":{"type":"array","items":{"type":"object","properties":{"toolId":{"type":"string"}},"required":["toolId"]}},"messages":{"type":"array","items":{"$ref":"#/components/schemas/PromptMessage"}},"parameters":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/LLMProviders"},"name":{"type":"string","description":"The name of the model for the provider."},"responseFormat":{"type":"string","enum":["JSON","TEXT"],"description":"Example: PromptResponseFormat.TEXT"},"temperature":{"type":"number","description":"Example: 1"},"topP":{"type":"number","description":"Example: 1"},"topK":{"type":"number","nullable":true,"minimum":1,"description":"Example: 50"},"frequencyPenalty":{"type":"number","description":"Example: 0"},"presencePenalty":{"type":"number","description":"Example: 0"},"maxTokens":{"type":"number","nullable":true,"description":"Example: 100"},"seed":{"type":"number","nullable":true,"description":"Example: 97946543"},"toolChoice":{"type":"string","nullable":true},"stream":{"type":"boolean"},"parallelToolCalls":{"type":"boolean"}},"required":["provider","name","responseFormat","temperature","topP","topK","frequencyPenalty","presencePenalty","maxTokens","seed","toolChoice","stream","parallelToolCalls"]}},"required":["name","tools","messages","parameters"]},"ToolBody":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-zA-Z0-9_-]{1,64}$","description":"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."},"description":{"type":"string","description":"A description of what the tool does, used by the model to choose when and how to call the tool."},"parameters":{"$ref":"#/components/schemas/ToolParameters"}},"required":["name","description","parameters"]},"EvaluationAssertionExactMatch":{"type":"object","properties":{"type":{"type":"string","enum":["EXACT_MATCH"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"targetValue":{"type":"string","description":"The value to match."},"jsonPath":{"type":"string","nullable":true,"default":"$","description":"A JSON path to use when matching a JSON response."},"ignoreCase":{"type":"boolean","default":false,"description":"Whether to ignore case when comparing strings."},"negate":{"type":"boolean","default":false,"description":"Whether to negate the assertion. \"true\" means the assertion must NOT be true."},"id":{"type":"string"}},"required":["type","evaluationId","targetValue","id"],"title":"EvaluationAssertionExactMatch"},"EvaluationAssertionContainsAll":{"type":"object","properties":{"type":{"type":"string","enum":["CONTAINS_ALL"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"targetValues":{"type":"array","items":{"type":"string"},"minItems":1,"description":"List of values any of which may be present."},"jsonPath":{"type":"string","nullable":true,"default":"$","description":"A JSON path to use when matching a JSON response."},"ignoreCase":{"type":"boolean","default":false,"description":"Whether to ignore case when comparing strings."},"negate":{"type":"boolean","default":false,"description":"Whether to negate the assertion. \"true\" means the assertion must NOT be true."},"id":{"type":"string"}},"required":["type","evaluationId","targetValues","id"],"title":"EvaluationAssertionContainsAll"},"EvaluationAssertionContainsAny":{"type":"object","properties":{"type":{"type":"string","enum":["CONTAINS_ANY"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"targetValues":{"type":"array","items":{"type":"string"},"minItems":1,"description":"List of values any of which may be present."},"jsonPath":{"type":"string","nullable":true,"default":"$","description":"A JSON path to use when matching a JSON response."},"ignoreCase":{"type":"boolean","default":false,"description":"Whether to ignore case when comparing strings."},"negate":{"type":"boolean","default":false,"description":"Whether to negate the assertion. \"true\" means the assertion must NOT be true."},"id":{"type":"string"}},"required":["type","evaluationId","targetValues","id"],"title":"EvaluationAssertionContainsAny"},"EvaluationAssertionStartsWith":{"type":"object","properties":{"type":{"type":"string","enum":["STARTS_WITH"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"targetValue":{"type":"string","description":"The value that the response should start with."},"jsonPath":{"type":"string","nullable":true,"default":"$","description":"A JSON path to use when matching a JSON response."},"ignoreCase":{"type":"boolean","default":false,"description":"Whether to ignore case when comparing strings."},"negate":{"type":"boolean","default":false,"description":"Whether to negate the assertion. \"true\" means the assertion must NOT be true."},"id":{"type":"string"}},"required":["type","evaluationId","targetValue","id"],"title":"EvaluationAssertionStartsWith"},"EvaluationAssertionCost":{"type":"object","properties":{"type":{"type":"string","enum":["COST"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"targetThreshold":{"type":"number","description":"The cost threshold to be evaluated against."},"id":{"type":"string"}},"required":["type","evaluationId","targetThreshold","id"],"title":"EvaluationAssertionCost"},"EvaluationAssertionLatency":{"type":"object","properties":{"type":{"type":"string","enum":["LATENCY"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"targetThreshold":{"type":"number","description":"The latency threshold to be evaluated against."},"id":{"type":"string"}},"required":["type","evaluationId","targetThreshold","id"],"title":"EvaluationAssertionLatency"},"EvaluationAssertionToolCalled":{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALLED"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"toolName":{"type":"string","description":"The name of the tool that should have been called."},"id":{"type":"string"}},"required":["type","evaluationId","toolName","id"],"title":"EvaluationAssertionToolCalled"},"EvaluationAssertionToolCalledWith":{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALLED_WITH"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"argKeyName":{"type":"string","description":"The argument name to be matched."},"toolName":{"type":"string","description":"The name of the tool that should have been called."},"ignoreCase":{"type":"boolean","default":false,"description":"Whether to ignore case when comparing argument names."},"negate":{"type":"boolean","default":false,"description":"Whether to negate the assertion. \"true\" means the assertion must NOT be true."},"id":{"type":"string"}},"required":["type","evaluationId","argKeyName","toolName","id"],"title":"EvaluationAssertionToolCalledWith"},"EvaluationAssertion":{"oneOf":[{"$ref":"#/components/schemas/EvaluationAssertionExactMatch"},{"$ref":"#/components/schemas/EvaluationAssertionContainsAll"},{"$ref":"#/components/schemas/EvaluationAssertionContainsAny"},{"$ref":"#/components/schemas/EvaluationAssertionStartsWith"},{"$ref":"#/components/schemas/EvaluationAssertionCost"},{"$ref":"#/components/schemas/EvaluationAssertionLatency"},{"$ref":"#/components/schemas/EvaluationAssertionToolCalled"},{"$ref":"#/components/schemas/EvaluationAssertionToolCalledWith"}],"discriminator":{"propertyName":"type","mapping":{"EXACT_MATCH":"#/components/schemas/EvaluationAssertionExactMatch","CONTAINS_ALL":"#/components/schemas/EvaluationAssertionContainsAll","CONTAINS_ANY":"#/components/schemas/EvaluationAssertionContainsAny","STARTS_WITH":"#/components/schemas/EvaluationAssertionStartsWith","COST":"#/components/schemas/EvaluationAssertionCost","LATENCY":"#/components/schemas/EvaluationAssertionLatency","TOOL_CALLED":"#/components/schemas/EvaluationAssertionToolCalled","TOOL_CALLED_WITH":"#/components/schemas/EvaluationAssertionToolCalledWith"}}},"EvaluationAssertionExactMatchBody":{"type":"object","properties":{"type":{"type":"string","enum":["EXACT_MATCH"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"targetValue":{"type":"string","description":"The value to match."},"jsonPath":{"type":"string","nullable":true,"default":"$","description":"A JSON path to use when matching a JSON response."},"ignoreCase":{"type":"boolean","default":false,"description":"Whether to ignore case when comparing strings."},"negate":{"type":"boolean","default":false,"description":"Whether to negate the assertion. \"true\" means the assertion must NOT be true."}},"required":["type","evaluationId","targetValue"],"title":"EvaluationAssertionExactMatchBody"},"EvaluationAssertionContainsAllBody":{"type":"object","properties":{"type":{"type":"string","enum":["CONTAINS_ALL"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"targetValues":{"type":"array","items":{"type":"string"},"minItems":1,"description":"List of values any of which may be present."},"jsonPath":{"type":"string","nullable":true,"default":"$","description":"A JSON path to use when matching a JSON response."},"ignoreCase":{"type":"boolean","default":false,"description":"Whether to ignore case when comparing strings."},"negate":{"type":"boolean","default":false,"description":"Whether to negate the assertion. \"true\" means the assertion must NOT be true."}},"required":["type","evaluationId","targetValues"],"title":"EvaluationAssertionContainsAllBody"},"EvaluationAssertionContainsAnyBody":{"type":"object","properties":{"type":{"type":"string","enum":["CONTAINS_ANY"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"targetValues":{"type":"array","items":{"type":"string"},"minItems":1,"description":"List of values any of which may be present."},"jsonPath":{"type":"string","nullable":true,"default":"$","description":"A JSON path to use when matching a JSON response."},"ignoreCase":{"type":"boolean","default":false,"description":"Whether to ignore case when comparing strings."},"negate":{"type":"boolean","default":false,"description":"Whether to negate the assertion. \"true\" means the assertion must NOT be true."}},"required":["type","evaluationId","targetValues"],"title":"EvaluationAssertionContainsAnyBody"},"EvaluationAssertionStartsWithBody":{"type":"object","properties":{"type":{"type":"string","enum":["STARTS_WITH"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"targetValue":{"type":"string","description":"The value that the response should start with."},"jsonPath":{"type":"string","nullable":true,"default":"$","description":"A JSON path to use when matching a JSON response."},"ignoreCase":{"type":"boolean","default":false,"description":"Whether to ignore case when comparing strings."},"negate":{"type":"boolean","default":false,"description":"Whether to negate the assertion. \"true\" means the assertion must NOT be true."}},"required":["type","evaluationId","targetValue"],"title":"EvaluationAssertionStartsWithBody"},"EvaluationAssertionCostBody":{"type":"object","properties":{"type":{"type":"string","enum":["COST"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"targetThreshold":{"type":"number","description":"The cost threshold to be evaluated against."}},"required":["type","evaluationId","targetThreshold"],"title":"EvaluationAssertionCostBody"},"EvaluationAssertionLatencyBody":{"type":"object","properties":{"type":{"type":"string","enum":["LATENCY"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"targetThreshold":{"type":"number","description":"The latency threshold to be evaluated against."}},"required":["type","evaluationId","targetThreshold"],"title":"EvaluationAssertionLatencyBody"},"EvaluationAssertionToolCalledBody":{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALLED"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"toolName":{"type":"string","description":"The name of the tool that should have been called."}},"required":["type","evaluationId","toolName"],"title":"EvaluationAssertionToolCalledBody"},"EvaluationAssertionToolCalledWithBody":{"type":"object","properties":{"type":{"type":"string","enum":["TOOL_CALLED_WITH"]},"evaluationId":{"type":"string"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the assertion within the evaluation."},"argKeyName":{"type":"string","description":"The argument name to be matched."},"toolName":{"type":"string","description":"The name of the tool that should have been called."},"ignoreCase":{"type":"boolean","default":false,"description":"Whether to ignore case when comparing argument names."},"negate":{"type":"boolean","default":false,"description":"Whether to negate the assertion. \"true\" means the assertion must NOT be true."}},"required":["type","evaluationId","argKeyName","toolName"],"title":"EvaluationAssertionToolCalledWithBody"},"EvaluationAssertionBody":{"oneOf":[{"$ref":"#/components/schemas/EvaluationAssertionExactMatchBody"},{"$ref":"#/components/schemas/EvaluationAssertionContainsAllBody"},{"$ref":"#/components/schemas/EvaluationAssertionContainsAnyBody"},{"$ref":"#/components/schemas/EvaluationAssertionStartsWithBody"},{"$ref":"#/components/schemas/EvaluationAssertionCostBody"},{"$ref":"#/components/schemas/EvaluationAssertionLatencyBody"},{"$ref":"#/components/schemas/EvaluationAssertionToolCalledBody"},{"$ref":"#/components/schemas/EvaluationAssertionToolCalledWithBody"}],"discriminator":{"propertyName":"type","mapping":{"EXACT_MATCH":"#/components/schemas/EvaluationAssertionExactMatchBody","CONTAINS_ALL":"#/components/schemas/EvaluationAssertionContainsAllBody","CONTAINS_ANY":"#/components/schemas/EvaluationAssertionContainsAnyBody","STARTS_WITH":"#/components/schemas/EvaluationAssertionStartsWithBody","COST":"#/components/schemas/EvaluationAssertionCostBody","LATENCY":"#/components/schemas/EvaluationAssertionLatencyBody","TOOL_CALLED":"#/components/schemas/EvaluationAssertionToolCalledBody","TOOL_CALLED_WITH":"#/components/schemas/EvaluationAssertionToolCalledWithBody"}}},"PromptVariables":{"type":"object","additionalProperties":{"type":"string","nullable":true},"description":"The template variables added to the prompt when executing the prompt."},"Evaluation":{"type":"object","properties":{"id":{"type":"string"},"promptId":{"type":"string"},"appendedMessages":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"},"description":"The messages to append to the completion messages when running the evaluation."},"variables":{"$ref":"#/components/schemas/PromptVariables"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the evaluation within the prompt."},"threshold":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"What percentage of assertions must pass for the evaluation to pass."}},"required":["id","promptId","appendedMessages","variables"]},"GetModelParametersBody":{"type":"object","properties":{"variables":{"$ref":"#/components/schemas/PromptVariables"},"overrideMessages":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"},"description":"Replaces the configured prompt messages when running the prompt."},"appendMessages":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"},"description":"Appended the the end of the configured prompt messages before running the prompt."},"user":{"type":"string","description":"A unique identifier representing your end-user, which can help monitor and detect abuse."}}},"GetCompletionBody":{"type":"object","properties":{"variables":{"$ref":"#/components/schemas/PromptVariables"},"overrideMessages":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"},"description":"Replaces the configured prompt messages when running the prompt."},"appendMessages":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"},"description":"Appended the the end of the configured prompt messages before running the prompt."},"user":{"type":"string","description":"A unique identifier representing your end-user, which can help monitor and detect abuse."}}},"AnthropicMessageParam":{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["text","type"],"title":"TextBlockParam"},{"type":"object","properties":{"source":{"type":"object","properties":{"data":{"type":"string"},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"]},"type":{"type":"string","enum":["base64"]}},"required":["data","media_type","type"],"title":"ImageBlockParamSource"},"type":{"type":"string","enum":["image"]}},"required":["source","type"],"title":"ImageBlockParam"},{"type":"object","properties":{"id":{"type":"string"},"input":{"type":"object","additionalProperties":{"type":"string"}},"name":{"type":"string"},"type":{"type":"string","enum":["tool_use"]}},"required":["id","input","name","type"],"title":"ToolUseBlockParam"},{"type":"object","properties":{"tool_use_id":{"type":"string"},"type":{"type":"string","enum":["tool_result"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"text":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["text","type"],"title":"TextBlockParam"},{"type":"object","properties":{"source":{"type":"object","properties":{"data":{"type":"string"},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/webp"]},"type":{"type":"string","enum":["base64"]}},"required":["data","media_type","type"],"title":"ImageBlockParamSource"},"type":{"type":"string","enum":["image"]}},"required":["source","type"],"title":"ImageBlockParam"}]}}]},"is_error":{"type":"boolean"}},"required":["tool_use_id","type"],"title":"ToolResultBlockParam"}]}}]},"role":{"type":"string","enum":["user","assistant"]}},"required":["content","role"]},"AnthropicMessageCreateParamsBase":{"type":"object","properties":{"max_tokens":{"type":"number"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/AnthropicMessageParam"}},"model":{"anyOf":[{"type":"string"},{"type":"string","enum":["claude-3-5-sonnet-20240620","claude-3-opus-20240229","claude-3-sonnet-20240229","claude-3-haiku-20240307"]}]},"metadata":{"type":"object","properties":{"user_id":{"type":"string","nullable":true}},"title":"MessageCreateParamsMetadata"},"stop_sequences":{"type":"array","items":{"type":"string"}},"system":{"type":"string"},"temperature":{"type":"number"},"tool_choice":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto"]}},"required":["type"],"title":"MessageCreateParamsToolChoiceAuto"},{"type":"object","properties":{"type":{"type":"string","enum":["any"]}},"required":["type"],"title":"MessageCreateParamsToolChoiceAny"},{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["tool"]}},"required":["name","type"],"title":"MessageCreateParamsToolChoiceTool"}]},"tools":{"type":"array","items":{"type":"object","properties":{"input_schema":{"type":"object","properties":{"type":{"type":"string","enum":["object"]},"properties":{"nullable":true}},"required":["type"],"additionalProperties":{"nullable":true},"title":"ToolInputSchema"},"name":{"type":"string"},"description":{"type":"string"}},"required":["input_schema","name"],"title":"ToolSchema"}},"top_k":{"type":"number"},"top_p":{"type":"number"}},"required":["max_tokens","messages","model"]},"AnthropicMessageCreateParamsNonStreamingSchema":{"allOf":[{"$ref":"#/components/schemas/AnthropicMessageCreateParamsBase"},{"type":"object","properties":{"stream":{"type":"boolean","enum":[false]}},"required":["stream"]}]},"OpenAIChatCompletionRequestSystemMessage":{"type":"object","properties":{"content":{"type":"string"},"role":{"type":"string","enum":["system"]},"name":{"type":"string"}},"required":["content","role"],"title":"OpenAIChatCompletionRequestSystemMessage"},"OpenAIChatCompletionRequestMessageContentPartText":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"],"title":"OpenAIChatCompletionRequestMessageContentPartText"},"OpenAIChatCompletionRequestMessageContentPartImage":{"type":"object","properties":{"type":{"type":"string","enum":["image_url"]},"image_url":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"detail":{"type":"string","enum":["auto","low","high"],"default":"auto"}},"required":["url"]}},"required":["type","image_url"],"title":"OpenAIChatCompletionRequestMessageContentPartImage"},"OpenAIChatCompletionRequestMessageContentPart":{"anyOf":[{"$ref":"#/components/schemas/OpenAIChatCompletionRequestMessageContentPartText"},{"$ref":"#/components/schemas/OpenAIChatCompletionRequestMessageContentPartImage"}],"title":"OpenAIChatCompletionRequestMessageContentPart"},"OpenAIChatCompletionRequestUserMessage":{"type":"object","properties":{"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/OpenAIChatCompletionRequestMessageContentPart"}}]},"role":{"type":"string","enum":["user"]},"name":{"type":"string"}},"required":["content","role"],"title":"OpenAIChatCompletionRequestUserMessage"},"OpenAIChatCompletionMessageToolCall":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"]}},"required":["id","type","function"],"title":"OpenAIChatCompletionMessageToolCall"},"OpenAIChatCompletionRequestAssistantMessage":{"type":"object","properties":{"content":{"type":"string","nullable":true},"role":{"type":"string","enum":["assistant"]},"name":{"type":"string"},"tool_calls":{"type":"array","items":{"$ref":"#/components/schemas/OpenAIChatCompletionMessageToolCall"}},"function_call":{"type":"object","nullable":true,"properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"required":["arguments","name"]}},"required":["role"],"title":"OpenAIChatCompletionRequestAssistantMessage"},"OpenAIChatCompletionRequestToolMessage":{"type":"object","properties":{"role":{"type":"string","enum":["tool"]},"content":{"type":"string"},"tool_call_id":{"type":"string"}},"required":["role","content","tool_call_id"],"title":"OpenAIChatCompletionRequestToolMessage"},"OpenAIChatCompletionRequestFunctionMessage":{"type":"object","properties":{"role":{"type":"string","enum":["function"]},"content":{"type":"string","nullable":true},"name":{"type":"string"}},"required":["role","content","name"],"title":"OpenAIChatCompletionRequestFunctionMessage"},"OpenAIChatCompletionRequestMessage":{"anyOf":[{"$ref":"#/components/schemas/OpenAIChatCompletionRequestSystemMessage"},{"$ref":"#/components/schemas/OpenAIChatCompletionRequestUserMessage"},{"$ref":"#/components/schemas/OpenAIChatCompletionRequestAssistantMessage"},{"$ref":"#/components/schemas/OpenAIChatCompletionRequestToolMessage"},{"$ref":"#/components/schemas/OpenAIChatCompletionRequestFunctionMessage"}],"title":"OpenAIChatCompletionRequestMessage"},"OpenAIResponseFormatText":{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"title":"OpenAIResponseFormatText"},"OpenAIResponseFormatJSONObject":{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"title":"OpenAIResponseFormatJSONObject"},"OpenAIResponseFormatJSONSchema":{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{"nullable":true}},"strict":{"type":"boolean","nullable":true}},"required":["name","strict"]}},"required":["type","json_schema"],"title":"OpenAIResponseFormatJSONSchema"},"OpenAIFunctionParameters":{"type":"object","additionalProperties":{"nullable":true}},"OpenAIFunctionObject":{"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"parameters":{"$ref":"#/components/schemas/OpenAIFunctionParameters"}},"required":["name"],"title":"OpenAIFunctionObject"},"OpenAIChatCompletionTool":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"$ref":"#/components/schemas/OpenAIFunctionObject"}},"required":["type","function"],"title":"OpenAIChatCompletionTool"},"OpenAIChatCompletionNamedToolChoice":{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"],"title":"OpenAIChatCompletionNamedToolChoice"},"OpenAIChatCompletionToolChoiceOption":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"$ref":"#/components/schemas/OpenAIChatCompletionNamedToolChoice"}],"title":"OpenAIChatCompletionToolChoiceOption"},"OpenAIParallelToolCalls":{"type":"boolean","default":true},"OpenAIChatCompletionCreateParamsBase":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/OpenAIChatCompletionRequestMessage"},"minItems":1},"model":{"type":"string"},"frequency_penalty":{"type":"number","nullable":true,"minimum":-2,"maximum":2,"default":0},"logit_bias":{"type":"object","nullable":true,"additionalProperties":{"type":"integer"}},"logprobs":{"type":"boolean","nullable":true,"default":false},"top_logprobs":{"type":"integer","nullable":true,"minimum":0,"maximum":20},"max_tokens":{"type":"integer","nullable":true},"n":{"type":"integer","nullable":true,"minimum":1,"maximum":128,"default":1},"presence_penalty":{"type":"number","nullable":true,"minimum":-2,"maximum":2,"default":0},"response_format":{"oneOf":[{"$ref":"#/components/schemas/OpenAIResponseFormatText"},{"$ref":"#/components/schemas/OpenAIResponseFormatJSONObject"},{"$ref":"#/components/schemas/OpenAIResponseFormatJSONSchema"}],"discriminator":{"propertyName":"type","mapping":{"text":"#/components/schemas/OpenAIResponseFormatText","json_object":"#/components/schemas/OpenAIResponseFormatJSONObject","json_schema":"#/components/schemas/OpenAIResponseFormatJSONSchema"}}},"seed":{"type":"integer","nullable":true,"minimum":-9223372036854776000,"maximum":9223372036854776000},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"temperature":{"type":"number","nullable":true,"minimum":0,"maximum":2,"default":1},"top_p":{"type":"number","nullable":true,"minimum":0,"maximum":1,"default":1},"tools":{"type":"array","items":{"$ref":"#/components/schemas/OpenAIChatCompletionTool"}},"tool_choice":{"$ref":"#/components/schemas/OpenAIChatCompletionToolChoiceOption"},"parallel_tool_calls":{"$ref":"#/components/schemas/OpenAIParallelToolCalls"},"user":{"type":"string"}},"required":["messages","model","response_format"]},"OpenAIChatCompletionCreateParamsNonStreaming":{"allOf":[{"$ref":"#/components/schemas/OpenAIChatCompletionCreateParamsBase"},{"type":"object","properties":{"stream":{"type":"boolean","enum":[false]}},"required":["stream"]}]},"ModelNonStreamingParameters":{"oneOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["anthropic"]},"name":{"type":"string"},"parameters":{"$ref":"#/components/schemas/AnthropicMessageCreateParamsNonStreamingSchema"}},"required":["provider","name","parameters"],"title":"AnthropicModelNonStreamingParameters"},{"type":"object","properties":{"provider":{"type":"string","enum":["openai"]},"name":{"type":"string"},"parameters":{"$ref":"#/components/schemas/OpenAIChatCompletionCreateParamsNonStreaming"}},"required":["provider","name","parameters"],"title":"OpenAIModelNonStreamingParameters"}]},"EvaluationBody":{"type":"object","properties":{"promptId":{"type":"string"},"appendedMessages":{"type":"array","items":{"$ref":"#/components/schemas/ConversationMessage"},"description":"The messages to append to the completion messages when running the evaluation."},"variables":{"$ref":"#/components/schemas/PromptVariables"},"weight":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"How heavily to weigh the evaluation within the prompt."},"threshold":{"type":"number","minimum":0,"maximum":1,"default":1,"description":"What percentage of assertions must pass for the evaluation to pass."}},"required":["promptId","appendedMessages","variables"]},"CompletionStats":{"type":"object","properties":{"inputTokenCount":{"type":"number","description":"The number of tokens in the input prompt."},"outputTokenCount":{"type":"number","description":"The number of tokens in the output completion."},"latency":{"type":"number","description":"The time in milliseconds it took to generate the completion."},"cost":{"type":"number","description":"The cost of generating the completion."}},"required":["inputTokenCount","outputTokenCount","latency","cost"]},"CreateCompletionResponse":{"type":"object","properties":{"provider":{"allOf":[{"$ref":"#/components/schemas/LLMProviders"},{"description":"The provider of the provided model."}]},"name":{"type":"string"},"stats":{"$ref":"#/components/schemas/CompletionStats"},"message":{"allOf":[{"$ref":"#/components/schemas/ConversationMessage"},{"description":"The completion message generated by the model."}]}},"required":["provider","name","stats","message"]}},"parameters":{}},"paths":{"/sdk/v1/prompts/{id}/completion":{"post":{"operationId":"completion","summary":"Completion","description":"Initiates a completion request to the configured LLM provider using specified parameters and provided variables. This endpoint abstracts the integration with different model providers, enabling seamless switching between models while maintaining a consistent data model for your application.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCompletionBody"}}}},"responses":{"200":{"description":"Successful completion response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompletionResponse"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const completionCreateResponse = await client.completion.create('1212121');\n\n  console.log(completionCreateResponse.provider);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\ncompletion_create_response = client.completion.create(\n    id=\"1212121\",\n)\nprint(completion_create_response.provider)"}]}},"/sdk/v1/prompts/{id}":{"post":{"operationId":"getModelParams","summary":"Get Model Parameters","description":"Fetches the configured model parameters and messages rendered with the provided variables mapped to the set LLM provider. This endpoint abstracts the need to handle mapping between different providers, while still allowing direct calls to the providers.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetModelParametersBody"}}}},"responses":{"200":{"description":"Successfully retrieved the prompt configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelNonStreamingParameters"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const response = await client.prompts.getParameters('1212121');\n\n  console.log(response);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nresponse = client.prompts.get_parameters(\n    id=\"1212121\",\n)\nprint(response)"}]},"get":{"operationId":"getPrompt","summary":"Get Prompt","description":"Get the configuration of an existing prompt.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptConfiguration"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const promptConfiguration = await client.prompts.get('1212121');\n\n  console.log(promptConfiguration.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nprompt_configuration = client.prompts.get(\n    \"1212121\",\n)\nprint(prompt_configuration.id)"}]},"put":{"operationId":"updatePrompt","summary":"Update Prompt","description":"Update the configuration of an existing prompt and deploys it.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptBody"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptConfiguration"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const promptConfiguration = await client.prompts.update('1212121', {\n    messages: [\n      {\n        content: [\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n        ],\n        promptMessageId: 'promptMessageId',\n        role: 'assistant',\n      },\n      {\n        content: [\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n        ],\n        promptMessageId: 'promptMessageId',\n        role: 'assistant',\n      },\n      {\n        content: [\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n        ],\n        promptMessageId: 'promptMessageId',\n        role: 'assistant',\n      },\n    ],\n    name: 'name',\n    parameters: {\n      frequencyPenalty: 0,\n      maxTokens: 0,\n      name: 'name',\n      parallelToolCalls: true,\n      presencePenalty: 0,\n      provider: 'ANTHROPIC',\n      responseFormat: 'JSON',\n      seed: 0,\n      stream: true,\n      temperature: 0,\n      toolChoice: 'toolChoice',\n      topK: 1,\n      topP: 0,\n    },\n    tools: [{ toolId: 'toolId' }, { toolId: 'toolId' }, { toolId: 'toolId' }],\n  });\n\n  console.log(promptConfiguration.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nprompt_configuration = client.prompts.update(\n    id=\"1212121\",\n    messages=[{\n        \"content\": [{\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }],\n        \"prompt_message_id\": \"promptMessageId\",\n        \"role\": \"assistant\",\n    }, {\n        \"content\": [{\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }],\n        \"prompt_message_id\": \"promptMessageId\",\n        \"role\": \"assistant\",\n    }, {\n        \"content\": [{\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }],\n        \"prompt_message_id\": \"promptMessageId\",\n        \"role\": \"assistant\",\n    }],\n    name=\"name\",\n    parameters={\n        \"frequency_penalty\": 0,\n        \"max_tokens\": 0,\n        \"name\": \"name\",\n        \"parallel_tool_calls\": True,\n        \"presence_penalty\": 0,\n        \"provider\": \"ANTHROPIC\",\n        \"response_format\": \"JSON\",\n        \"seed\": 0,\n        \"stream\": True,\n        \"temperature\": 0,\n        \"tool_choice\": \"toolChoice\",\n        \"top_k\": 1,\n        \"top_p\": 0,\n    },\n    tools=[{\n        \"tool_id\": \"toolId\"\n    }, {\n        \"tool_id\": \"toolId\"\n    }, {\n        \"tool_id\": \"toolId\"\n    }],\n)\nprint(prompt_configuration.id)"}]},"delete":{"operationId":"deletePrompt","summary":"Delete Prompt","description":"Delete a prompt configuration by ID. This will remove the prompt from the system and all associated data including evaluations.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Successful deletion of the prompt","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true}}}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const prompt = await client.prompts.delete('1212121');\n\n  console.log(prompt.success);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nprompt = client.prompts.delete(\n    \"1212121\",\n)\nprint(prompt.success)"}]}},"/sdk/v1/prompts":{"post":{"operationId":"createPrompt","summary":"Create Prompt","description":"Creates and deploys a new prompt","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptBody"}}}},"responses":{"201":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptConfiguration"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const promptConfiguration = await client.prompts.create({\n    messages: [\n      {\n        content: [\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n        ],\n        promptMessageId: 'promptMessageId',\n        role: 'assistant',\n      },\n      {\n        content: [\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n        ],\n        promptMessageId: 'promptMessageId',\n        role: 'assistant',\n      },\n      {\n        content: [\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n        ],\n        promptMessageId: 'promptMessageId',\n        role: 'assistant',\n      },\n    ],\n    name: 'name',\n    parameters: {\n      frequencyPenalty: 0,\n      maxTokens: 0,\n      name: 'name',\n      parallelToolCalls: true,\n      presencePenalty: 0,\n      provider: 'ANTHROPIC',\n      responseFormat: 'JSON',\n      seed: 0,\n      stream: true,\n      temperature: 0,\n      toolChoice: 'toolChoice',\n      topK: 1,\n      topP: 0,\n    },\n    tools: [{ toolId: 'toolId' }, { toolId: 'toolId' }, { toolId: 'toolId' }],\n  });\n\n  console.log(promptConfiguration.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nprompt_configuration = client.prompts.create(\n    messages=[{\n        \"content\": [{\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }],\n        \"prompt_message_id\": \"promptMessageId\",\n        \"role\": \"assistant\",\n    }, {\n        \"content\": [{\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }],\n        \"prompt_message_id\": \"promptMessageId\",\n        \"role\": \"assistant\",\n    }, {\n        \"content\": [{\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }],\n        \"prompt_message_id\": \"promptMessageId\",\n        \"role\": \"assistant\",\n    }],\n    name=\"name\",\n    parameters={\n        \"frequency_penalty\": 0,\n        \"max_tokens\": 0,\n        \"name\": \"name\",\n        \"parallel_tool_calls\": True,\n        \"presence_penalty\": 0,\n        \"provider\": \"ANTHROPIC\",\n        \"response_format\": \"JSON\",\n        \"seed\": 0,\n        \"stream\": True,\n        \"temperature\": 0,\n        \"tool_choice\": \"toolChoice\",\n        \"top_k\": 1,\n        \"top_p\": 0,\n    },\n    tools=[{\n        \"tool_id\": \"toolId\"\n    }, {\n        \"tool_id\": \"toolId\"\n    }, {\n        \"tool_id\": \"toolId\"\n    }],\n)\nprint(prompt_configuration.id)"}]},"get":{"operationId":"getPrompts","summary":"List Prompts","description":"Retrieve all prompts","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PromptConfiguration"}}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const promptConfigurations = await client.prompts.list();\n\n  console.log(promptConfigurations);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nprompt_configurations = client.prompts.list()\nprint(prompt_configurations)"}]}},"/sdk/v1/tools":{"post":{"operationId":"createTool","summary":"Creates tool","description":"Data needed to create a new tool","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolBody"}}}},"responses":{"201":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const tool = await client.tools.create({\n    description: 'description',\n    name: 'name',\n    parameters: { foo: 'bar' },\n  });\n\n  console.log(tool.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\ntool = client.tools.create(\n    description=\"description\",\n    name=\"name\",\n    parameters={\n        \"foo\": \"bar\"\n    },\n)\nprint(tool.id)"}]},"get":{"operationId":"getTools","summary":"List tools","description":"Retrieve all tools","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tool"}}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const tools = await client.tools.list();\n\n  console.log(tools);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\ntools = client.tools.list()\nprint(tools)"}]}},"/sdk/v1/tools/{id}":{"get":{"operationId":"getTool","summary":"Get Tool","description":"Fetch the details of a specific tool using its ID.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Successfully retrieved the tool configuration","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const tool = await client.tools.get('1212121');\n\n  console.log(tool.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\ntool = client.tools.get(\n    \"1212121\",\n)\nprint(tool.id)"}]},"put":{"operationId":"updateTool","summary":"Update tool","description":"Update the configuration of an existing tool by providing its ID and new data.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolBody"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tool"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const tool = await client.tools.update('1212121', {\n    description: 'description',\n    name: 'name',\n    parameters: { foo: 'bar' },\n  });\n\n  console.log(tool.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\ntool = client.tools.update(\n    id=\"1212121\",\n    description=\"description\",\n    name=\"name\",\n    parameters={\n        \"foo\": \"bar\"\n    },\n)\nprint(tool.id)"}]},"delete":{"operationId":"deleteTool","summary":"Delete tool","description":"Delete a tool by ID.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Successful deletion of the tool","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true}}}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const tool = await client.tools.delete('1212121');\n\n  console.log(tool.success);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\ntool = client.tools.delete(\n    \"1212121\",\n)\nprint(tool.success)"}]}},"/sdk/v1/evaluation-assertions":{"post":{"operationId":"createEvaluationAssertion","summary":"Create Evaluation Assertion","description":"Creates a new evaluation assertion","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationAssertionBody"}}}},"responses":{"201":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationAssertion"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const evaluationAssertion = await client.evaluationAssertions.create({\n    evaluationId: 'evaluationId',\n    targetValue: 'targetValue',\n    type: 'EXACT_MATCH',\n  });\n\n  console.log(evaluationAssertion);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nevaluation_assertion = client.evaluation_assertions.create(\n    evaluation_id=\"evaluationId\",\n    target_value=\"targetValue\",\n    type=\"EXACT_MATCH\",\n)\nprint(evaluation_assertion)"}]},"get":{"operationId":"getEvaluationAssertions","summary":"List Evaluation Assertions","description":"Retrieve all evaluation assertions optionally filtered by evaluation ID","parameters":[{"schema":{"type":"string","description":"Optional ID to filter the assertions by specific evaluation ID","example":"eval-1234"},"required":false,"name":"evaluationId","in":"query"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EvaluationAssertion"}}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const evaluationAssertions = await client.evaluationAssertions.list();\n\n  console.log(evaluationAssertions);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nevaluation_assertions = client.evaluation_assertions.list()\nprint(evaluation_assertions)"}]}},"/sdk/v1/evaluation-assertions/{id}":{"get":{"operationId":"getEvaluationAssertion","summary":"Get Evaluation Assertion","description":"Retrieve the details of an evaluation assertion using its ID.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Successfully retrieved the evaluation assertion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationAssertion"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const evaluationAssertion = await client.evaluationAssertions.get('1212121');\n\n  console.log(evaluationAssertion);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nevaluation_assertion = client.evaluation_assertions.get(\n    \"1212121\",\n)\nprint(evaluation_assertion)"}]},"put":{"operationId":"updateEvaluationAssertion","summary":"Update Evaluation Assertion","description":"Update an existing evaluation assertion by providing its ID and new data.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationAssertionBody"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationAssertion"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const evaluationAssertion = await client.evaluationAssertions.update('1212121', {\n    evaluationId: 'evaluationId',\n    targetValue: 'targetValue',\n    type: 'EXACT_MATCH',\n  });\n\n  console.log(evaluationAssertion);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nevaluation_assertion = client.evaluation_assertions.update(\n    id=\"1212121\",\n    evaluation_id=\"evaluationId\",\n    target_value=\"targetValue\",\n    type=\"EXACT_MATCH\",\n)\nprint(evaluation_assertion)"}]},"delete":{"operationId":"deleteEvaluationAssertion","summary":"Delete Evaluation Assertion","description":"Delete an evaluation assertion by providing its ID.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Successful deletion of the evaluation assertion","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const evaluationAssertion = await client.evaluationAssertions.delete('1212121');\n\n  console.log(evaluationAssertion.success);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nevaluation_assertion = client.evaluation_assertions.delete(\n    \"1212121\",\n)\nprint(evaluation_assertion.success)"}]}},"/sdk/v1/evaluations":{"post":{"operationId":"createEvaluation","summary":"Create Evaluation","description":"Create a new evaluation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationBody"}}}},"responses":{"201":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluation"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const evaluation = await client.evaluations.create({\n    appendedMessages: [\n      {\n        content: [\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n        ],\n        role: 'assistant',\n      },\n      {\n        content: [\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n        ],\n        role: 'assistant',\n      },\n      {\n        content: [\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n        ],\n        role: 'assistant',\n      },\n    ],\n    promptId: 'promptId',\n    variables: { foo: 'string' },\n  });\n\n  console.log(evaluation.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nevaluation = client.evaluations.create(\n    appended_messages=[{\n        \"content\": [{\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }],\n        \"role\": \"assistant\",\n    }, {\n        \"content\": [{\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }],\n        \"role\": \"assistant\",\n    }, {\n        \"content\": [{\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }],\n        \"role\": \"assistant\",\n    }],\n    prompt_id=\"promptId\",\n    variables={\n        \"foo\": \"string\"\n    },\n)\nprint(evaluation.id)"}]},"get":{"operationId":"getEvaluations","summary":"List Evaluations","description":"Retrieve all evaluations","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Evaluation"}}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const evaluations = await client.evaluations.list();\n\n  console.log(evaluations);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nevaluations = client.evaluations.list()\nprint(evaluations)"}]}},"/sdk/v1/evaluations/{id}":{"get":{"operationId":"getEvaluation","summary":"Get Evaluation","description":"Retrieve an evaluation by ID","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluation"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const evaluation = await client.evaluations.get('1212121');\n\n  console.log(evaluation.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nevaluation = client.evaluations.get(\n    \"1212121\",\n)\nprint(evaluation.id)"}]},"put":{"operationId":"updateEvaluation","summary":"Update Evaluation","description":"Update an evaluation by ID.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationBody"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Evaluation"}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const evaluation = await client.evaluations.update('1212121', {\n    appendedMessages: [\n      {\n        content: [\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n        ],\n        role: 'assistant',\n      },\n      {\n        content: [\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n        ],\n        role: 'assistant',\n      },\n      {\n        content: [\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n          { text: 'text', type: 'TEXT' },\n        ],\n        role: 'assistant',\n      },\n    ],\n    promptId: 'promptId',\n    variables: { foo: 'string' },\n  });\n\n  console.log(evaluation.id);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nevaluation = client.evaluations.update(\n    id=\"1212121\",\n    appended_messages=[{\n        \"content\": [{\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }],\n        \"role\": \"assistant\",\n    }, {\n        \"content\": [{\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }],\n        \"role\": \"assistant\",\n    }, {\n        \"content\": [{\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }, {\n            \"text\": \"text\",\n            \"type\": \"TEXT\",\n        }],\n        \"role\": \"assistant\",\n    }],\n    prompt_id=\"promptId\",\n    variables={\n        \"foo\": \"string\"\n    },\n)\nprint(evaluation.id)"}]},"delete":{"operationId":"deleteEvaluation","summary":"Delete Evaluation","description":"Delete an evaluation by ID.","parameters":[{"schema":{"type":"string","example":"1212121"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Successful deletion of the evaluation","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"description":"Missing or invalid parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"lang":"JavaScript","source":"import PromptFoundry from '@prompt-foundry/typescript-sdk';\n\nconst client = new PromptFoundry({\n  apiKey: process.env['PROMPT_FOUNDRY_API_KEY'], // This is the default and can be omitted\n});\n\nasync function main() {\n  const evaluation = await client.evaluations.delete('1212121');\n\n  console.log(evaluation.success);\n}\n\nmain();"},{"lang":"Python","source":"import os\nfrom prompt_foundry_python_sdk import PromptFoundry\n\nclient = PromptFoundry(\n    # This is the default and can be omitted\n    api_key=os.environ.get(\"PROMPT_FOUNDRY_API_KEY\"),\n)\nevaluation = client.evaluations.delete(\n    \"1212121\",\n)\nprint(evaluation.success)"}]}}}}