Amigo Self-Image API
The Self-Image API from Amigo — 2 operation(s) for self-image.
The Self-Image API from Amigo — 2 operation(s) for self-image.
openapi: 3.1.0
info:
title: Amigo Account Self-Image API
version: 0.1.0
servers:
- url: https://api.amigo.ai
- url: https://internal-api.amigo.ai
- url: https://api-eu-central-1.amigo.ai
- url: https://api-ap-southeast-2.amigo.ai
- url: https://api-ca-central-1.amigo.ai
security:
- Bearer-Authorization: []
Bearer-Authorization-Organization: []
Basic: []
tags:
- name: Self-Image
paths:
/v1/{workspace_id}/entities/{entity_id}/brief:
post:
tags:
- Self-Image
summary: Generate Brief
description: Generate a Self-Image brief for the target entity (patient, cohort, territory, emirate, or district).
operationId: generate_brief_v1__workspace_id__entities__entity_id__brief_post
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: entity_id
in: path
required: true
schema:
type: string
format: uuid
title: Entity Id
description: Target entity UUID
description: Target entity UUID
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BriefResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- Self-Image
summary: Get Latest Brief
description: Return the latest Self-Image brief for the target entity (null shape if none).
operationId: get_latest_brief_v1__workspace_id__entities__entity_id__brief_get
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
- name: entity_id
in: path
required: true
schema:
type: string
format: uuid
title: Entity Id
description: Target entity UUID
description: Target entity UUID
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BriefResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/v1/{workspace_id}/brief:
get:
tags:
- Self-Image
summary: Get Latest Workspace Brief
description: Return the latest workspace-level Self-Image brief (null shape if none).
operationId: get_latest_workspace_brief_v1__workspace_id__brief_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BriefResponse'
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
post:
tags:
- Self-Image
summary: Generate Workspace Brief
description: Generate a workspace-level Self-Image brief (Opus 4.7).
operationId: generate_workspace_brief_v1__workspace_id__brief_post
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BriefResponse'
parameters:
- name: workspace_id
in: path
required: true
schema:
type: string
format: uuid
title: Workspace Id
components:
schemas:
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
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
BriefResponse:
properties:
event_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Event Id
target_entity_id:
type: string
format: uuid
title: Target Entity Id
target_entity_type:
type: string
enum:
- patient
- cohort
- workspace
- territory
- emirate
- district
title: Target Entity Type
content_md:
anyOf:
- type: string
maxLength: 20000
- type: 'null'
title: Content Md
content_json:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Content Json
version:
anyOf:
- type: string
maxLength: 64
- type: 'null'
title: Version
evidence_event_ids:
items:
type: string
format: uuid
type: array
maxItems: 500
title: Evidence Event Ids
confidence:
type: number
maximum: 1.0
minimum: 0.0
title: Confidence
event_count:
type: integer
minimum: 0.0
title: Event Count
model_name:
anyOf:
- type: string
maxLength: 128
- type: 'null'
title: Model Name
truncated:
type: boolean
title: Truncated
default: false
generated_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Generated At
type: object
required:
- event_id
- target_entity_id
- target_entity_type
- content_json
- confidence
- event_count
- generated_at
title: BriefResponse
description: 'Wire shape for a Self-Image brief.
``event_id`` is null when no brief has ever been generated for the
entity. All other fields are nullable in that case so the UI can
render a consistent empty state.'
securitySchemes:
Bearer-Authorization:
type: http
scheme: bearer
bearerFormat: JWT
description: Amigo issued JWT token that identifies an user. It's issued either after logging in through the frontend, or manually through the [`SignInWithAPIKey`](sign-in-with-api-key) endpoint.
Bearer-Authorization-Organization:
type: apiKey
in: header
name: X-ORG-ID
description: An optional organization identifier that indicates from which organization the token is issued. This is used in rare cases where the user to authenticate is making a request for resources in another organization.
Basic:
type: http
scheme: basic
description: The username should be set to {org_id}_{user_id}, and the password should be the Amigo issued JWT token that identifies the user.