Skip to content

Prompts Endpoints

Prompts API endpoints.


Overview

Method Endpoint Description
POST /api/v1/prompts/create-editing-prompt Create Editing Prompt
POST /api/v1/prompts/create-for-generation Create Prompt For Generation

API Reference

Sartiq Backend Server - Prompts 0.1.0

prompts


POST /api/v1/prompts/compose

Compose Prompt

Description

Compose a prompt by running the base system prompt through the builder pipeline.

Accepts optional entity IDs (shot_type_id, pose_id, etc.) in the request body. Each ID is resolved to its model and passed to the ordered builder chain.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No

Request body

{
    "shot_type_id": null,
    "pose_id": null,
    "background_preset_id": null,
    "production_request_id": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "shot_type_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Shot Type Id"
        },
        "pose_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Pose Id"
        },
        "background_preset_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Background Preset Id"
        },
        "production_request_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Production Request Id"
        }
    },
    "type": "object",
    "title": "PromptContextRequest",
    "description": "Request schema mirroring PromptContext fields as optional IDs.\n\nWhen new fields are added to PromptContext, add the corresponding\nID field here and update the resolver in deps.py."
}

Responses

{
    "prompt": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "prompt": {
            "type": "string",
            "title": "Prompt"
        }
    },
    "type": "object",
    "required": [
        "prompt"
    ],
    "title": "ComposedPromptResponse"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Schemas

ComposedPromptResponse

Name Type Description
prompt string

HTTPValidationError

Name Type Description
detail Array<ValidationError>

PromptContextRequest

Name Type Description
background_preset_id
pose_id
production_request_id
shot_type_id

ValidationError

Name Type Description
ctx
input
loc Array<>
msg string
type string

Security schemes

Name Type Scheme Description
OAuth2PasswordBearer oauth2