Skip to content

Websocket Endpoints

Websocket API endpoints.


Overview

Method Endpoint Description
GET /api/v1/schema Get Websocket Message

API Reference

Sartiq Backend Server - Websocket 0.1.0

websocket


GET /api/v1/schema

Get Websocket Message

Description

Get WebSocket schema for client codegen.

This endpoint exposes all WebSocket types automatically. Add new message types to WebSocketMessage in websocket_event.py and they will be included without modifying this endpoint.

Responses

{
    "data": 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 response body
{
    "properties": {
        "data": {
            "anyOf": [
                {
                    "$ref": "#/components/schemas/GenerationMessage"
                },
                {
                    "$ref": "#/components/schemas/LookPreviewMessage"
                },
                {
                    "$ref": "#/components/schemas/ShotMessage"
                },
                {
                    "$ref": "#/components/schemas/ChatMessageEvent"
                },
                {
                    "$ref": "#/components/schemas/ChatMessageUpdatedEvent"
                },
                {
                    "$ref": "#/components/schemas/ChatMessageDeletedEvent"
                },
                {
                    "$ref": "#/components/schemas/ChatTypingEvent"
                },
                {
                    "$ref": "#/components/schemas/ChatSubscribed"
                },
                {
                    "$ref": "#/components/schemas/ChatSubscribeError"
                },
                {
                    "$ref": "#/components/schemas/ProductDraftEvent"
                },
                {
                    "$ref": "#/components/schemas/NotificationMessage"
                },
                {
                    "$ref": "#/components/schemas/HealthMessage"
                },
                {
                    "$ref": "#/components/schemas/AuthSuccessMessage"
                },
                {
                    "$ref": "#/components/schemas/AuthErrorMessage"
                }
            ],
            "title": "Data"
        }
    },
    "type": "object",
    "required": [
        "data"
    ],
    "title": "WebSocketMessage"
}

Schemas

AuthErrorMessage

Name Type Description
error string
type string

AuthSuccessMessage

Name Type Description
context string
organization_id
type string
user_id string

BodyType

Type: string

ChatMessageAuthor

Name Type Description
full_name
id string(uuid)
role

ChatMessageDeletedEvent

Name Type Description
payload ChatMessageDeletedPayload
type ChatSocketEventType

ChatMessageDeletedPayload

Name Type Description
chat_id string(uuid)
message_id string(uuid)

ChatMessageEvent

Name Type Description
payload ChatMessagePublic
type ChatSocketEventType

ChatMessagePublic

Name Type Description
attachments
chat_id string(uuid)
created_at string(date-time)
email_notified_at
id string(uuid)
options
owner
owner_id
presentation
reply_to
reply_to_id
text string
updated_at string(date-time)

ChatMessageReplyPreview

Name Type Description
id string(uuid)
is_restricted boolean
is_unavailable boolean
owner
text

ChatMessageUpdatedEvent

Name Type Description
payload ChatMessagePublic
type ChatSocketEventType

ChatPresentationStatus

Type: string

ChatSocketEventType

Type: string

ChatSubscribed

Name Type Description
chat_id string(uuid)
type ChatSocketEventType

ChatSubscribeError

Name Type Description
chat_id
reason ChatSubscribeErrorReason
type ChatSocketEventType

ChatSubscribeErrorReason

Type: string

ChatTypingEvent

Name Type Description
payload ChatTypingPayload
type ChatSocketEventType

ChatTypingPayload

Name Type Description
chat_id string(uuid)
is_bot boolean
is_typing boolean
user_id

ContentDefPublic

Name Type Description
description string
id string(uuid)
label
reference_media

DefaultShotTypes

Type: string

DownloadStatus

Type: string

DraftMediaItem

Name Type Description
confidence
object_key string
role DraftMediaRole

DraftMediaRole

Type: string

ErrorCategory-Output

Type: string

ExternalImagePushPublic

Name Type Description
completed_at
created_at string(date-time)
error_message
failure_reason
id string(uuid)
integration_id string(uuid)
integration_name
push_status PushStatus
pushed_at
updated_at string(date-time)

Gender

Type: string

GenerationMessage

Name Type Description
payload GenerationPublic
type GenerationSocketEventType

GenerationPublic

Name Type Description
autogenerated boolean
batch_size integer
created_at string(date-time)
deleted_at
extra_prompt
framing
garment_placement_base_image_media
garment_placement_base_image_url
garment_placement_mask_media
generated_prompt
generation_strategy GenerationStrategy
generation_type GenerationType
generative_models_id
generative_workflow_engine
generative_workflow_revision
generative_workflow_template_id
has_product boolean
has_product2 boolean
has_subject boolean
height integer
id string(uuid)
is_agentic boolean
mannequin_base_image_media
mannequin_base_image_url
organization_id
owner_id string(uuid)
predictions Array<PredictionPublic>
product2_description
product2_id
product2_image_media
product2_image_url
product_description
product_id
product_image_media
product_image_url
production_request_id
reference_images_media
reference_images_paths Array<string>
refine boolean
scale_factor
seed integer
shot_id
shot_type_id
shot_type_string
status GenerationStatus
subject_description
subject_id
subject_image_media
subject_image_url
tool
updated_at string(date-time)
width integer

GenerationSocketEventType

Type: string

GenerationStatus

Type: string

GenerationStrategy

Type: string

GenerationTool

Type: string

GenerationType

Type: string

HealthMessage

Name Type Description
payload SystemHealthStatus
type string

HealthStatus

Type: string

LocationModelPickerParameters

Name Type Description
mode string

LocationModelPickerPresentation

Name Type Description
parameters LocationModelPickerParameters
resource_id string(uuid)
schema_version integer
setup_revision string
status ChatPresentationStatus
type string

LocationProductPickerParameters

Name Type Description
mode string

LocationProductPickerPresentation

Name Type Description
parameters LocationProductPickerParameters
resource_id string(uuid)
schema_version integer
setup_revision string
status ChatPresentationStatus
type string

LocationReferencePickerParameters

Name Type Description
mode string

LocationReferencePickerPresentation

Name Type Description
parameters LocationReferencePickerParameters
resource_id string(uuid)
schema_version integer
setup_revision string
status ChatPresentationStatus
type string

LocationVersionOneContractParameters

LocationVersionOneContractPresentation

Name Type Description
parameters LocationVersionOneContractParameters
resource_id string(uuid)
schema_version integer
setup_revision string
status ChatPresentationStatus
type string

LookPreviewMessage

Name Type Description
payload LookPreviewPublic
type GenerationSocketEventType

LookPreviewPublic

Name Type Description
error_message
id string(uuid)
image_url
outfit_id
product_ids Array<string(uuid)>
production_request_id string(uuid)
status LookPreviewStatus
subject_id string(uuid)

LookPreviewStatus

Type: string

MediaInput

Name Type Description
alt_text
caption
color_profile
dominant_color
duration
height
media_resource_id
protected boolean
url
width

MediaResourcePublic

Name Type Description
alt_text
aspect_ratio
caption
color_profile
content_hash string
created_at string(date-time)
dominant_color
duration
extension string
file_size integer
height
id string(uuid)
orientation
protected boolean
resource_type MediaResourceType
url string
width

MediaResourceType

Type: string

MessageOptions

Name Type Description
data SubjectOptions

MessageOptionSelect

Type: string

NotificationMessage

Name Type Description
payload NotificationPublic
type NotificationSocketEventType

NotificationPublic

Name Type Description
body string
created_at string(date-time)
deep_link string
entity_id string(uuid)
entity_type string
group_key
id string(uuid)
organization_id string(uuid)
read_at
title string
type NotificationType

NotificationSocketEventType

Type: string

NotificationType

Type: string

PredictionPublic

Name Type Description
created_at string(date-time)
duration_seconds
error_category
error_message
favourite boolean
generation_id string(uuid)
generative_workflow_execution_id
id string(uuid)
refined_image_url Computed field for backward compatibility. Returns the most recent successful refine's result_image_url.
refines Array<RefinePublic>
result_image_media
result_image_url
result_video_media
result_video_url
seed integer
shot_type
status PredictionStatus
updated_at string(date-time)

PredictionStatus

Type: string

ProductDraftEvent

Name Type Description
payload ProductDraftPublic
type ProductIngestSocketEventType

ProductDraftPublic

Name Type Description
created_at string(date-time)
created_by string(uuid)
discard_reason
group_key string
id string(uuid)
job_id string(uuid)
media Array<DraftMediaItem>
organization_id string(uuid)
payload
product_id
rationale
requested_by string(uuid)
status ProductDraftStatus
updated_at string(date-time)

ProductDraftStatus

Type: string

ProductIngestSocketEventType

Type: string

ProductionRequestStatusKey

Type: string

PushFailureReason

Type: string

PushStatus

Type: string

QualityAssessmentStatus

Type: string

RefinePublic

Name Type Description
created_at string(date-time)
error_category
error_message
height
id string(uuid)
prediction_id string(uuid)
prompt
refine_model_id
refines_refine_id
result_image_media
result_image_url
scale_factor
status RefineStatus
task_id
updated_at string(date-time)
width

RefineStatus

Type: string

RevisionSource

Type: string

RoleName

Type: string

RolePublic

Name Type Description
description
id string(uuid)
name RoleName

ShotMessage

Name Type Description
payload ShotPublic
type ShotSocketEventType

ShotPublic

Name Type Description
content_defs Array<ContentDefPublic>
created_at string(date-time)
current_revision_id
download_status DownloadStatus
id string(uuid)
pose_preset_id
production_request_id
revisions Array<ShotRevisionPublic>
rework_available integer
rework_used integer
shot_type
status ProductionRequestStatusKey
updated_at string(date-time)

ShotRevisionImagePublic

Name Type Description
autogenerated boolean
created_at string(date-time)
effective_image_url
id string(uuid)
image_media
image_url
notes
prediction_id
refine_id
shot_revision_id string(uuid)
sketch_image_media
sketch_image_url
source_type RevisionSource
updated_at string(date-time)

ShotRevisionPublic

Name Type Description
automatic_quality_assessment_status
created_at string(date-time)
display_name string
effective_image_url
id string(uuid)
images Array<ShotRevisionImagePublic>
notes
owner
owner_id
post_prod_fallback_reason
post_prod_source
previous_revision_id
push_records Array<ExternalImagePushPublic>
push_status Aggregate push status across all integrations. Returns: None (no pushes), PENDING, IN_PROGRESS, AWAITING_CONFIRMATION, COMPLETED, or FAILED Priority: FAILED > IN_PROGRESS > AWAITING_CONFIRMATION > PENDING > COMPLETED
shot_id string(uuid)
shot_revision_status
shot_status ProductionRequestStatusKey
updated_at string(date-time)
version integer

ShotRevisionStatus

Type: string

ShotSocketEventType

Type: string

ShotTypeFraming

Type: string

ShotTypePublic

Name Type Description
core_focus boolean
created_at string(date-time)
default_shot_type
deleted_at
file_naming_convention
framing
id string(uuid)
margins
margins_key
name string
organization_id
owner_id
prompt
prompt_builder_section
public boolean
reference_image
reference_image_url
requires_subject boolean
shot_type_prompt_instruction
shot_type_ref_image_url
updated_at string(date-time)
view_angle ViewAngle

SubjectAgeClass

Type: string

SubjectOption

Name Type Description
age_class SubjectAgeClass
body_type
cover_image
cover_image_url
gender Gender
label string
subject_type SubjectType
value string(uuid)

SubjectOptions

Name Type Description
casting_link boolean
items Array<SubjectOption>
resolved boolean
select MessageOptionSelect
selected_values Array<string(uuid)>
type string

SubjectType

Type: string

SubsystemStatus

Name Type Description
last_checked string(date-time)
status HealthStatus

SystemHealthStatus

Name Type Description
agents SubsystemStatus
backend SubsystemStatus
compute_server SubsystemStatus
overall HealthStatus

UnsupportedChatPresentation

Name Type Description
schema_version integer
status string
type string

UserSummary

Name Type Description
email string()
full_name
id string(uuid)
role

ViewAngle

Type: string

WebSocketMessage

Name Type Description
data

Security schemes

Name Type Scheme Description
OAuth2PasswordBearer oauth2