ArthurAI Prompts API
The Prompts API from ArthurAI — 12 operation(s) for prompts.
The Prompts API from ArthurAI — 12 operation(s) for prompts.
openapi: 3.1.0
info:
title: Arthur GenAI Engine Agent Discovery Prompts API
version: 2.1.688
tags:
- name: Prompts
paths:
/api/v1/tasks/{task_id}/prompts/{prompt_name}/versions/{prompt_version}:
get:
tags:
- Prompts
summary: Get an agentic prompt
description: Get an agentic prompt by name and version
operationId: get_agentic_prompt_api_v1_tasks__task_id__prompts__prompt_name__versions__prompt_version__get
security:
- API Key: []
parameters:
- name: prompt_name
in: path
required: true
schema:
type: string
title: Prompt Name
- name: prompt_version
in: path
required: true
schema:
type: string
title: Prompt Version
description: The version of the prompt to retrieve. Can be 'latest', a version number (e.g. '1', '2', etc.), an ISO datetime string (e.g. '2025-01-01T00:00:00'), or a tag.
description: The version of the prompt to retrieve. Can be 'latest', a version number (e.g. '1', '2', etc.), an ISO datetime string (e.g. '2025-01-01T00:00:00'), or a tag.
- name: task_id
in: path
required: true
schema:
type: string
format: uuid
title: Task Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgenticPrompt'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Prompts
summary: Delete an agentic prompt version
description: Deletes a specific version of an agentic prompt
operationId: delete_agentic_prompt_version_api_v1_tasks__task_id__prompts__prompt_name__versions__prompt_version__delete
security:
- API Key: []
parameters:
- name: prompt_name
in: path
required: true
schema:
type: string
title: Prompt Name
- name: prompt_version
in: path
required: true
schema:
type: string
title: Prompt Version
description: The version of the prompt to delete. Can be 'latest', a version number (e.g. '1', '2', etc.), an ISO datetime string (e.g. '2025-01-01T00:00:00'), or a tag.
description: The version of the prompt to delete. Can be 'latest', a version number (e.g. '1', '2', etc.), an ISO datetime string (e.g. '2025-01-01T00:00:00'), or a tag.
- name: task_id
in: path
required: true
schema:
type: string
format: uuid
title: Task Id
responses:
'204':
description: Prompt version deleted.
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/tasks/{task_id}/prompts:
get:
tags:
- Prompts
summary: Get all agentic prompts
description: Get all agentic prompts for a given task with optional filtering.
operationId: get_all_agentic_prompts_api_v1_tasks__task_id__prompts_get
security:
- API Key: []
parameters:
- name: task_id
in: path
required: true
schema:
type: string
format: uuid
title: Task Id
- name: sort_by
in: query
required: false
schema:
$ref: '#/components/schemas/LLMMetadataSortField'
description: Field to sort the metadata list by. 'name' (default) preserves the historical alphabetical ordering. 'latest_version_created_at' orders by the most recent version's creation timestamp so that pagination matches the 'last updated' display.
default: name
description: Field to sort the metadata list by. 'name' (default) preserves the historical alphabetical ordering. 'latest_version_created_at' orders by the most recent version's creation timestamp so that pagination matches the 'last updated' display.
- name: sort
in: query
required: false
schema:
$ref: '#/components/schemas/PaginationSortMethod'
description: Sort the results (asc/desc)
default: desc
description: Sort the results (asc/desc)
- name: page_size
in: query
required: false
schema:
type: integer
description: Page size. Default is 10. Must be greater than 0 and less than 5000.
default: 10
title: Page Size
description: Page size. Default is 10. Must be greater than 0 and less than 5000.
- name: page
in: query
required: false
schema:
type: integer
description: Page number
default: 0
title: Page
description: Page number
- name: llm_asset_names
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
description: LLM asset names to filter on using partial matching. If provided, llm assets matching any of these name patterns will be returned
title: Llm Asset Names
description: LLM asset names to filter on using partial matching. If provided, llm assets matching any of these name patterns will be returned
- name: model_provider
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by model provider (e.g., 'openai', 'anthropic', 'azure').
title: Model Provider
description: Filter by model provider (e.g., 'openai', 'anthropic', 'azure').
- name: model_name
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by model name (e.g., 'gpt-4', 'claude-3-5-sonnet').
title: Model Name
description: Filter by model name (e.g., 'gpt-4', 'claude-3-5-sonnet').
- name: created_after
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Inclusive start date for prompt creation in ISO8601 string format. Use local time (not UTC).
title: Created After
description: Inclusive start date for prompt creation in ISO8601 string format. Use local time (not UTC).
- name: created_before
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Exclusive end date for prompt creation in ISO8601 string format. Use local time (not UTC).
title: Created Before
description: Exclusive end date for prompt creation in ISO8601 string format. Use local time (not UTC).
- name: tags
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
description: List of tags to filter for items that have any matching tag across any version.
title: Tags
description: List of tags to filter for items that have any matching tag across any version.
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/LLMGetAllMetadataListResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/tasks/{task_id}/prompts/{prompt_name}/versions:
get:
tags:
- Prompts
summary: List all versions of an agentic prompt
description: List all versions of an agentic prompt with optional filtering.
operationId: get_all_agentic_prompt_versions_api_v1_tasks__task_id__prompts__prompt_name__versions_get
security:
- API Key: []
parameters:
- name: prompt_name
in: path
required: true
schema:
type: string
title: Prompt Name
- name: task_id
in: path
required: true
schema:
type: string
format: uuid
title: Task Id
- name: sort
in: query
required: false
schema:
$ref: '#/components/schemas/PaginationSortMethod'
description: Sort the results (asc/desc)
default: desc
description: Sort the results (asc/desc)
- name: page_size
in: query
required: false
schema:
type: integer
description: Page size. Default is 10. Must be greater than 0 and less than 5000.
default: 10
title: Page Size
description: Page size. Default is 10. Must be greater than 0 and less than 5000.
- name: page
in: query
required: false
schema:
type: integer
description: Page number
default: 0
title: Page
description: Page number
- name: model_provider
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by model provider (e.g., 'openai', 'anthropic', 'azure').
title: Model Provider
description: Filter by model provider (e.g., 'openai', 'anthropic', 'azure').
- name: model_name
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by model name (e.g., 'gpt-4', 'claude-3-5-sonnet').
title: Model Name
description: Filter by model name (e.g., 'gpt-4', 'claude-3-5-sonnet').
- name: created_after
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Inclusive start date for prompt creation in ISO8601 string format. Use local time (not UTC).
title: Created After
description: Inclusive start date for prompt creation in ISO8601 string format. Use local time (not UTC).
- name: created_before
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Exclusive end date for prompt creation in ISO8601 string format. Use local time (not UTC).
title: Created Before
description: Exclusive end date for prompt creation in ISO8601 string format. Use local time (not UTC).
- name: exclude_deleted
in: query
required: false
schema:
type: boolean
description: Whether to exclude deleted prompt versions from the results. Default is False.
default: false
title: Exclude Deleted
description: Whether to exclude deleted prompt versions from the results. Default is False.
- name: min_version
in: query
required: false
schema:
anyOf:
- type: integer
minimum: 1
- type: 'null'
description: Minimum version number to filter on (inclusive).
title: Min Version
description: Minimum version number to filter on (inclusive).
- name: max_version
in: query
required: false
schema:
anyOf:
- type: integer
minimum: 1
- type: 'null'
description: Maximum version number to filter on (inclusive).
title: Max Version
description: Maximum version number to filter on (inclusive).
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgenticPromptVersionListResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/completions:
post:
tags:
- Prompts
summary: Run/Stream an unsaved agentic prompt
description: Runs or streams an unsaved agentic prompt
operationId: run_agentic_prompt_api_v1_completions_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CompletionRequest'
required: true
responses:
'200':
description: An AgenticPromptRunResponse object for non-streaming requests or a StreamingResponse which has two events, a chunk event or a final_response event
content:
application/json:
schema:
$ref: '#/components/schemas/AgenticPromptRunResponse'
text/event-stream:
schema:
type: string
example: "# Chunk event\nevent: chunk\ndata: {\n \"id\": \"string\",\n \"created\": 1760636425,\n \"model\": \"string\",\n \"object\": \"string\",\n \"system_fingerprint\": \"string\",\n \"choices\": [\n {\n \"finish_reason\": null,\n \"index\": 0,\n \"delta\": {\n \"provider_specific_fields\": null,\n \"refusal\": null,\n \"content\": \"string\",\n \"role\": null,\n \"function_call\": null,\n \"tool_calls\": null,\n \"audio\": null\n },\n \"logprobs\": null\n }\n ],\n \"provider_specific_fields\": null\n}\n\n# Final response event\nevent: final_response\ndata: {\n \"content\": \"string\",\n \"tool_calls\": [\n \"string\"\n ],\n \"cost\": \"string\"\n}\n\n"
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- API Key: []
/api/v1/prompt_renders:
post:
tags:
- Prompts
summary: Render an unsaved prompt with variables
description: Render an unsaved prompt by replacing template variables with provided values. Accepts messages directly in the request body instead of loading from database.
operationId: render_unsaved_agentic_prompt_api_v1_prompt_renders_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UnsavedPromptRenderingRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/RenderedPromptResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- API Key: []
/api/v1/prompt_variables:
post:
tags:
- Prompts
summary: Gets the list of variables needed from an unsaved prompt's messages
description: Gets the list of variables needed from an unsaved prompt's messages
operationId: get_unsaved_prompt_variables_list_api_v1_prompt_variables_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UnsavedPromptVariablesRequest'
required: true
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UnsavedPromptVariablesListResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- API Key: []
/api/v1/tasks/{task_id}/prompts/{prompt_name}/versions/{prompt_version}/completions:
post:
tags:
- Prompts
summary: Run/Stream a specific version of an agentic prompt
description: Run or stream a specific version of an existing agentic prompt
operationId: run_saved_agentic_prompt_api_v1_tasks__task_id__prompts__prompt_name__versions__prompt_version__completions_post
security:
- API Key: []
parameters:
- name: prompt_name
in: path
required: true
schema:
type: string
title: Prompt Name
- name: prompt_version
in: path
required: true
schema:
type: string
title: Prompt Version
description: The version of the prompt to run. Can be 'latest', a version number (e.g. '1', '2', etc.), an ISO datetime string (e.g. '2025-01-01T00:00:00'), or a tag.
description: The version of the prompt to run. Can be 'latest', a version number (e.g. '1', '2', etc.), an ISO datetime string (e.g. '2025-01-01T00:00:00'), or a tag.
- name: task_id
in: path
required: true
schema:
type: string
format: uuid
title: Task Id
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PromptCompletionRequest'
default:
variables: []
strict: false
stream: false
responses:
'200':
description: An AgenticPromptRunResponse object for non-streaming requests or a StreamingResponse which has two events, a chunk event or a final_response event
content:
application/json:
schema:
$ref: '#/components/schemas/AgenticPromptRunResponse'
text/event-stream:
schema:
type: string
example: "# Chunk event\nevent: chunk\ndata: {\n \"id\": \"string\",\n \"created\": 1760636425,\n \"model\": \"string\",\n \"object\": \"string\",\n \"system_fingerprint\": \"string\",\n \"choices\": [\n {\n \"finish_reason\": null,\n \"index\": 0,\n \"delta\": {\n \"provider_specific_fields\": null,\n \"refusal\": null,\n \"content\": \"string\",\n \"role\": null,\n \"function_call\": null,\n \"tool_calls\": null,\n \"audio\": null\n },\n \"logprobs\": null\n }\n ],\n \"provider_specific_fields\": null\n}\n\n# Final response event\nevent: final_response\ndata: {\n \"content\": \"string\",\n \"tool_calls\": [\n \"string\"\n ],\n \"cost\": \"string\"\n}\n\n"
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/tasks/{task_id}/prompts/{prompt_name}/versions/{prompt_version}/renders:
post:
tags:
- Prompts
summary: Render a specific version of an agentic prompt with variables
description: Render a specific version of an existing agentic prompt by replacing template variables with provided values. Returns the complete prompt object with rendered messages.
operationId: render_saved_agentic_prompt_api_v1_tasks__task_id__prompts__prompt_name__versions__prompt_version__renders_post
security:
- API Key: []
parameters:
- name: prompt_name
in: path
required: true
schema:
type: string
title: Prompt Name
- name: prompt_version
in: path
required: true
schema:
type: string
title: Prompt Version
description: The version of the prompt to render. Can be 'latest', a version number (e.g. '1', '2', etc.), an ISO datetime string (e.g. '2025-01-01T00:00:00'), or a tag.
description: The version of the prompt to render. Can be 'latest', a version number (e.g. '1', '2', etc.), an ISO datetime string (e.g. '2025-01-01T00:00:00'), or a tag.
- name: task_id
in: path
required: true
schema:
type: string
format: uuid
title: Task Id
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SavedPromptRenderingRequest'
default:
completion_request:
variables: []
strict: false
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgenticPrompt'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/tasks/{task_id}/prompts/{prompt_name}:
post:
tags:
- Prompts
summary: Save an agentic prompt
description: Save an agentic prompt to the database
operationId: save_agentic_prompt_api_v1_tasks__task_id__prompts__prompt_name__post
security:
- API Key: []
parameters:
- name: prompt_name
in: path
required: true
schema:
type: string
title: Prompt Name
- name: task_id
in: path
required: true
schema:
type: string
format: uuid
title: Task Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAgenticPromptRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgenticPrompt'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Prompts
summary: Delete an agentic prompt
description: Deletes an entire agentic prompt
operationId: delete_agentic_prompt_api_v1_tasks__task_id__prompts__prompt_name__delete
security:
- API Key: []
parameters:
- name: prompt_name
in: path
required: true
schema:
type: string
title: Prompt Name
- name: task_id
in: path
required: true
schema:
type: string
format: uuid
title: Task Id
responses:
'204':
description: Prompt deleted.
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/tasks/{task_id}/prompts/{prompt_name}/versions/tags/{tag}:
get:
tags:
- Prompts
summary: Get an agentic prompt by name and tag
description: Get an agentic prompt by name and tag
operationId: get_agentic_prompt_by_tag_api_v1_tasks__task_id__prompts__prompt_name__versions_tags__tag__get
security:
- API Key: []
parameters:
- name: prompt_name
in: path
required: true
schema:
type: string
title: Prompt Name
- name: tag
in: path
required: true
schema:
type: string
title: Tag
- name: task_id
in: path
required: true
schema:
type: string
format: uuid
title: Task Id
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgenticPrompt'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/tasks/{task_id}/prompts/{prompt_name}/versions/{prompt_version}/tags:
put:
tags:
- Prompts
summary: Add a tag to an agentic prompt version
description: Add a tag to an agentic prompt version
operationId: add_tag_to_agentic_prompt_version_api_v1_tasks__task_id__prompts__prompt_name__versions__prompt_version__tags_put
security:
- API Key: []
parameters:
- name: prompt_name
in: path
required: true
schema:
type: string
title: Prompt Name
- name: prompt_version
in: path
required: true
schema:
type: string
title: Prompt Version
description: The version of the prompt to retrieve. Can be 'latest', a version number (e.g. '1', '2', etc.), an ISO datetime string (e.g. '2025-01-01T00:00:00'), or a tag.
description: The version of the prompt to retrieve. Can be 'latest', a version number (e.g. '1', '2', etc.), an ISO datetime string (e.g. '2025-01-01T00:00:00'), or a tag.
- name: task_id
in: path
required: true
schema:
type: string
format: uuid
title: Task Id
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Body_add_tag_to_agentic_prompt_version_api_v1_tasks__task_id__prompts__prompt_name__versions__prompt_version__tags_put'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AgenticPrompt'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/tasks/{task_id}/prompts/{prompt_name}/versions/{prompt_version}/tags/{tag}:
delete:
tags:
- Prompts
summary: Remove a tag from an agentic prompt version
description: Remove a tag from an agentic prompt version
operationId: delete_tag_from_agentic_prompt_version_api_v1_tasks__task_id__prompts__prompt_name__versions__prompt_version__tags__tag__delete
security:
- API Key: []
parameters:
- name: prompt_name
in: path
required: true
schema:
type: string
title: Prompt Name
- name: prompt_version
in: path
required: true
schema:
type: string
title: Prompt Version
description: The version of the prompt to retrieve. Can be 'latest', a version number (e.g. '1', '2', etc.), an ISO datetime string (e.g. '2025-01-01T00:00:00'), or a tag.
description: The version of the prompt to retrieve. Can be 'latest', a version number (e.g. '1', '2', etc.), an ISO datetime string (e.g. '2025-01-01T00:00:00'), or a tag.
- name: tag
in: path
required: true
schema:
type: string
title: Tag
- name: task_id
in: path
required: true
schema:
type: string
format: uuid
title: Task Id
responses:
'204':
description: Prompt version deleted.
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
LLMResponseFormat-Input:
properties:
type:
$ref: '#/components/schemas/LLMResponseFormatEnum'
description: 'Response format type: ''text'', ''json_object'', or ''json_schema'''
examples:
- json_schema
json_schema:
anyOf:
- $ref: '#/components/schemas/LLMResponseSchema-Input'
- type: 'null'
description: JSON schema definition (required when type is 'json_schema')
additionalProperties: false
type: object
required:
- type
title: LLMResponseFormat
EvalKind:
type: string
enum:
- llm_as_a_judge
- pii
- pii_v1
- toxicity
- prompt_injection
title: EvalKind
description: Discriminator for all eval types stored in the llm_evals table.
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
VariableRenderingRequest:
properties:
variables:
anyOf:
- items:
$ref: '#/components/schemas/VariableTemplateValue'
type: array
- type: 'null'
title: Variables
description: List of VariableTemplateValue fields that specify the values to fill in for each template in the prompt
default: []
strict:
anyOf:
- type: boolean
- type: 'null'
title: Strict
description: Whether to enforce strict validation of variables. If True, any variables that are found in the prompt but not in the variables list will raise an error.
default: false
type: object
title: VariableRenderingRequest
JsonPropertySchema:
properties:
type:
type: string
title: Type
description: The argument's type (e.g. string, boolean, etc.)
default: string
description:
anyOf:
- type: string
- type: 'null'
title: Description
description: A description of the argument
enum:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Enum
description: An enum for the argument (e.g. ['celsius', 'fahrenheit'])
items:
anyOf:
- {}
- type: 'null'
title: Items
description: For array types, describes the items
type: object
title: JsonPropertySchema
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
LLMConfigSettings:
properties:
timeout:
anyOf:
- type: number
- type: 'null'
title: Timeout
description: Request timeout in seconds
temperature:
anyOf:
- type: number
- type: 'null'
title: Temperature
description: Sampling temperature (0.0 to 2.0). Higher values make output more random
top_p:
anyOf:
- type: number
- type: 'null'
title: Top P
description: Top-p sampling parameter (0.0 to 1.0). Alternative to temperature
max_tokens:
anyOf:
- type: integer
- type: 'null'
title: Max Tokens
description: Maximum number of tokens to generate in the response
stop:
anyOf:
- type: string
- type: 'null'
title: Stop
description: Stop sequence(s) where the model should stop generating
presence_penalty:
anyOf:
- type: number
- type: 'null'
title: Presence Penalty
description: Presence penalty (-2.0 to 2.0). Positive values penalize new tokens based on their presence
frequency_penalty:
anyOf:
- type: number
- type: 'null'
title: Frequency Penalty
description: Frequency penalty (-2.0 to 2.0). Positive values penalize tokens based on frequency
seed:
anyOf:
- type: integer
- type: 'null'
title: Seed
description: Random seed for reproducible outputs
logprobs:
anyOf:
- type: boolean
- type: 'null'
title: Logprobs
description: Whether to return log probabilities of output tokens
# --- truncated at 32 KB (64 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/arthurai/refs/heads/main/openapi/arthurai-prompts-api-openapi.yml