openapi: 3.1.0 info: title: Fast ACCOUNT_COSTS PROMPT_LIBRARY API version: 0.1.0 tags: - name: PROMPT_LIBRARY paths: /prompts/: get: tags: - PROMPT_LIBRARY summary: Get All Prompts description: 'Get all prompts (public + tenant) with filtering, sorting, and pagination. Returns prompts accessible to the user based on their teams.' operationId: get_all_prompts_prompts__get security: - HTTPBearer: [] - HTTPBearer: [] parameters: - name: tags in: query required: false schema: anyOf: - type: array items: type: string - type: 'null' description: Filter by tags. Returns prompts that have ANY of the specified tags. title: Tags description: Filter by tags. Returns prompts that have ANY of the specified tags. - name: owners in: query required: false schema: anyOf: - type: array items: type: integer - type: 'null' description: Filter by owner user IDs. Supports multiple values. title: Owners description: Filter by owner user IDs. Supports multiple values. - name: teams in: query required: false schema: anyOf: - type: array items: type: integer - type: 'null' description: Filter by team IDs. title: Teams description: Filter by team IDs. - name: search_text in: query required: false schema: anyOf: - type: string - type: 'null' description: Search in title, description, and prompt text title: Search Text description: Search in title, description, and prompt text - name: is_public in: query required: false schema: anyOf: - type: boolean - type: 'null' description: Filter by public/tenant prompts title: Is Public description: Filter by public/tenant prompts - name: type in: query required: false schema: anyOf: - type: string - type: 'null' description: 'Filter by prompt type: ''saved'' for tenant prompts, ''default'' or ''public'' for public prompts. Supports comma-separated values like ''default,saved'' to get both types.' title: Type description: 'Filter by prompt type: ''saved'' for tenant prompts, ''default'' or ''public'' for public prompts. Supports comma-separated values like ''default,saved'' to get both types.' - name: page in: query required: false schema: type: integer minimum: 1 description: Page number default: 1 title: Page description: Page number - name: page_size in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Number of items per page default: 20 title: Page Size description: Number of items per page - name: sort in: query required: false schema: type: string description: 'Sort by field: created_at, updated_at, last_used_at' default: created_at title: Sort description: 'Sort by field: created_at, updated_at, last_used_at' - name: sort_order in: query required: false schema: type: string description: 'Sort order: asc or desc' default: desc title: Sort Order description: 'Sort order: asc or desc' - name: size in: query required: false schema: type: integer maximum: 100 minimum: 1 description: Page size default: 50 title: Size description: Page size responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/Page_PromptResponse_' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - PROMPT_LIBRARY summary: Create Prompt description: 'Create a new prompt. All prompts are stored in the tenant table, owned by the creating user (the service user, Altimate AI, included).' operationId: create_prompt_prompts__post deprecated: true security: - HTTPBearer: [] - HTTPBearer: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreatePromptRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PromptResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /prompts/tags: get: tags: - PROMPT_LIBRARY summary: Get Unique Tags description: 'Get unique tags from all accessible prompts. Returns tags from both public and tenant prompts that the user can access.' operationId: get_unique_tags_prompts_tags_get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TagsResponse' security: - HTTPBearer: [] - HTTPBearer: [] /prompts/starter: get: tags: - PROMPT_LIBRARY summary: Get Starter Prompts description: 'Get starter prompts from public prompt library. Optionally filter by entity_type and/or integration_type to get context-specific prompts. Returns up to `public_max` (default 4) prompts sorted by created_at descending.' operationId: get_starter_prompts_prompts_starter_get security: - HTTPBearer: [] - HTTPBearer: [] parameters: - name: entity_type in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter prompts by entity type (e.g., snowflake_query, databricks_warehouse, dbt_model) title: Entity Type description: Filter prompts by entity type (e.g., snowflake_query, databricks_warehouse, dbt_model) - name: integration_type in: query required: false schema: anyOf: - type: string - type: 'null' description: Filter prompts by integration type (e.g., snowflake, databricks, dbt). Only prompts whose attributes.integration_type matches exactly are returned. title: Integration Type description: Filter prompts by integration type (e.g., snowflake, databricks, dbt). Only prompts whose attributes.integration_type matches exactly are returned. - name: public_max in: query required: false schema: anyOf: - type: integer maximum: 20 minimum: 0 - type: 'null' description: Max number of public starter prompts to return. Defaults to 4. title: Public Max description: Max number of public starter prompts to return. Defaults to 4. responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/StarterPromptsResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /prompts/{prompt_id}: get: tags: - PROMPT_LIBRARY summary: Get Prompt By Id description: 'Get a single prompt by ID. Returns the prompt if the user has access to it.' operationId: get_prompt_by_id_prompts__prompt_id__get deprecated: true security: - HTTPBearer: [] - HTTPBearer: [] parameters: - name: prompt_id in: path required: true schema: type: string format: uuid title: Prompt Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PromptResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' post: tags: - PROMPT_LIBRARY summary: Update Prompt description: 'Update an existing prompt. Users can only update prompts they created, service users can update any prompt.' operationId: update_prompt_prompts__prompt_id__post deprecated: true security: - HTTPBearer: [] - HTTPBearer: [] parameters: - name: prompt_id in: path required: true schema: type: string format: uuid title: Prompt Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdatePromptRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PromptResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' put: tags: - PROMPT_LIBRARY summary: Update Prompt description: 'Update an existing prompt. Users can only update prompts they created, service users can update any prompt.' operationId: update_prompt_prompts__prompt_id__put deprecated: true security: - HTTPBearer: [] - HTTPBearer: [] parameters: - name: prompt_id in: path required: true schema: type: string format: uuid title: Prompt Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdatePromptRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PromptResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - PROMPT_LIBRARY summary: Delete Prompt description: 'Delete a prompt (soft delete). Users can only delete prompts they created, service users can delete any prompt.' operationId: delete_prompt_prompts__prompt_id__delete deprecated: true security: - HTTPBearer: [] - HTTPBearer: [] parameters: - name: prompt_id in: path required: true schema: type: string format: uuid title: Prompt Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' components: schemas: TagsResponse: properties: tags: items: type: string type: array title: Tags type: object required: - tags title: TagsResponse description: Response schema for unique tags ValidationError: properties: loc: items: anyOf: - type: string - type: integer type: array title: Location msg: type: string title: Message type: type: string title: Error Type type: object required: - loc - msg - type title: ValidationError HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' type: array title: Detail type: object title: HTTPValidationError Page_PromptResponse_: properties: items: items: $ref: '#/components/schemas/PromptResponse' type: array title: Items total: anyOf: - type: integer minimum: 0.0 - type: 'null' title: Total page: anyOf: - type: integer minimum: 1.0 - type: 'null' title: Page size: anyOf: - type: integer minimum: 1.0 - type: 'null' title: Size pages: anyOf: - type: integer minimum: 0.0 - type: 'null' title: Pages type: object required: - items - total - page - size title: Page[PromptResponse] UpdatePromptRequest: properties: title: anyOf: - type: string maxLength: 255 - type: 'null' title: Title description: anyOf: - type: string - type: 'null' title: Description prompt_text: anyOf: - type: string minLength: 1 - type: 'null' title: Prompt Text tags: anyOf: - items: type: string type: array - type: 'null' title: Tags teams: anyOf: - items: type: integer type: array - type: 'null' title: Teams attributes: anyOf: - additionalProperties: true type: object - type: 'null' title: Attributes type: object title: UpdatePromptRequest description: Request schema for updating an existing prompt CreatePromptRequest: properties: title: anyOf: - type: string maxLength: 255 - type: 'null' title: Title description: anyOf: - type: string - type: 'null' title: Description prompt_text: type: string minLength: 1 title: Prompt Text tags: items: type: string type: array title: Tags teams: anyOf: - items: type: integer type: array - type: 'null' title: Teams attributes: additionalProperties: true type: object title: Attributes type: object required: - prompt_text title: CreatePromptRequest description: Request schema for creating a new prompt StarterPromptsResponse: properties: hello_message: anyOf: - type: string - type: 'null' title: Hello Message prompts: items: $ref: '#/components/schemas/PromptResponse' type: array title: Prompts type: object required: - prompts title: StarterPromptsResponse description: Response schema for starter prompts with contextual hello message PromptResponse: properties: id: type: string format: uuid title: Id title: type: string title: Title description: anyOf: - type: string - type: 'null' title: Description prompt_text: type: string title: Prompt Text tags: items: type: string type: array title: Tags teams: anyOf: - items: type: integer type: array - type: 'null' title: Teams created_by: type: integer title: Created By created_at: type: string format: date-time title: Created At updated_at: type: string format: date-time title: Updated At last_used_at: anyOf: - type: string format: date-time - type: 'null' title: Last Used At attributes: additionalProperties: true type: object title: Attributes is_public: type: boolean title: Is Public default: false type: object required: - id - title - prompt_text - created_by - created_at - updated_at title: PromptResponse description: Response schema for a single prompt securitySchemes: HTTPBearer: type: http scheme: bearer