For the complete documentation index, see llms.txt. This page is also available as Markdown.

REST API

Use the REST API to manage persistent Ojin resources such as model configurations, assets, and Human Agents.

The raw OpenAPI specification for this API is also available at openapi.gitbook.com/o/V9IIQ3Cw10PlDcbzN32h/spec/ojin-rest-api.json.

This page covers the HTTP REST API. It is separate from Ojin's realtime model APIs, which use WebSockets for streaming media. For example, for ojin/oris-portrait, see Realtime API Reference.

Authentication

Authenticated REST endpoints require an API key in the X-API-Key header.

curl https://api.ojin.ai/v1/model-configs \
  -H "X-API-Key: $OJIN_API_KEY"

For API key setup guidance, see Get your API key.

Model Configurations

Use model configurations to create and manage reusable settings for Ojin models.

model_configurations is variant-specific. To determine the correct object shape, first fetch the target model variant and read its configuration_schema, then build your model_configurations payload to match that JSON Schema.

List Model Configurations

get

Retrieves a list of Model Configurations. By default returns only organization-owned configurations. Use source='template' to retrieve template configurations instead. Supports pagination and filtering by model variant.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Query parameters
model_variant_idstringOptional

Filter model configurations by the model_variant_id.

model_variant_tagstringOptional

Filter model configurations whose model variant contains this tag (e.g. "_agent-tts").

sourcestring · enumOptional

Filter items by ownership source. Use 'org' for items owned by the user's organization, 'template' for items from the template organization. Defaults to 'org'.

Default: orgPossible values:
limitinteger · min: 1 · max: 100Optional

Number of items to return per page.

Default: 20
offsetintegerOptional

Number of items to skip for pagination.

Default: 0
Responses
200

A paginated list of model configurations.

application/json
get/model-configs
GET /v1/model-configs HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "model_config_id": "123e4567-e89b-12d3-a456-426614174000",
      "organization_id": "text",
      "model_id": "text",
      "model_variant_id": "text",
      "created_by": "text",
      "title": "text",
      "model_configurations": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      },
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total_items": 150
  }
}

Create a new Model Configuration

post
Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Body

Payload for creating a new Model Configuration.

titlestringRequired
model_variant_idstringRequired
Responses
201

Model Configuration created.

application/json

Represents a specific configuration of a ModelVariant.

model_config_idstring · uuidRead-onlyRequired

Server-generated unique ID.

organization_idstringRead-onlyRequired

Owning organization ID (from external IdP).

model_idstringRead-onlyRequired

ID of the parent Model, derived from the Model Variant.

model_variant_idstringRequired

ID of the ModelVariant being configured. NOT NULL.

created_bystringRead-onlyRequired

Creator's user ID (from external IdP), or api_key:<id> when created via an API key.

titlestringRequired

Title for the configuration. NOT NULL, unique per organization_id.

created_atstring · date-timeRead-onlyRequired

Timestamp of creation. Defaults to CURRENT_TIMESTAMP.

updated_atstring · date-timeRead-onlyRequired

Timestamp of last update. Auto-updates.

post/model-configs
POST /v1/model-configs HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 104

{
  "title": "text",
  "model_variant_id": "text",
  "model_configurations": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}
{
  "model_config_id": "123e4567-e89b-12d3-a456-426614174000",
  "organization_id": "text",
  "model_id": "text",
  "model_variant_id": "text",
  "created_by": "text",
  "title": "text",
  "model_configurations": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Retrieve a specific Model Configuration

get
Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
model_config_idstring · uuidRequired

The unique identifier (UUID) of the Model Configuration.

Responses
200

Model Configuration details.

application/json

Represents a specific configuration of a ModelVariant.

model_config_idstring · uuidRead-onlyRequired

Server-generated unique ID.

organization_idstringRead-onlyRequired

Owning organization ID (from external IdP).

model_idstringRead-onlyRequired

ID of the parent Model, derived from the Model Variant.

model_variant_idstringRequired

ID of the ModelVariant being configured. NOT NULL.

created_bystringRead-onlyRequired

Creator's user ID (from external IdP), or api_key:<id> when created via an API key.

titlestringRequired

Title for the configuration. NOT NULL, unique per organization_id.

created_atstring · date-timeRead-onlyRequired

Timestamp of creation. Defaults to CURRENT_TIMESTAMP.

updated_atstring · date-timeRead-onlyRequired

Timestamp of last update. Auto-updates.

get/model-configs/{model_config_id}
GET /v1/model-configs/{model_config_id} HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "model_config_id": "123e4567-e89b-12d3-a456-426614174000",
  "organization_id": "text",
  "model_id": "text",
  "model_variant_id": "text",
  "created_by": "text",
  "title": "text",
  "model_configurations": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Update an existing Model Configuration

put
Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
model_config_idstring · uuidRequired

The unique identifier (UUID) of the Model Configuration.

Body

Payload for updating a Model Configuration (title and parameters only).

titlestringRequired
Responses
200

Model Configuration updated.

application/json

Represents a specific configuration of a ModelVariant.

model_config_idstring · uuidRead-onlyRequired

Server-generated unique ID.

organization_idstringRead-onlyRequired

Owning organization ID (from external IdP).

model_idstringRead-onlyRequired

ID of the parent Model, derived from the Model Variant.

model_variant_idstringRequired

ID of the ModelVariant being configured. NOT NULL.

created_bystringRead-onlyRequired

Creator's user ID (from external IdP), or api_key:<id> when created via an API key.

titlestringRequired

Title for the configuration. NOT NULL, unique per organization_id.

created_atstring · date-timeRead-onlyRequired

Timestamp of creation. Defaults to CURRENT_TIMESTAMP.

updated_atstring · date-timeRead-onlyRequired

Timestamp of last update. Auto-updates.

put/model-configs/{model_config_id}
PUT /v1/model-configs/{model_config_id} HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 78

{
  "title": "text",
  "model_configurations": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}
{
  "model_config_id": "123e4567-e89b-12d3-a456-426614174000",
  "organization_id": "text",
  "model_id": "text",
  "model_variant_id": "text",
  "created_by": "text",
  "title": "text",
  "model_configurations": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Delete a Model Configuration

delete
Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
model_config_idstring · uuidRequired

The unique identifier (UUID) of the Model Configuration.

Query parameters
referenced_bystring · uuidOptional

Delete reference to the agent configuration.

Responses
204

Operation successful, no content to return.

No content

delete/model-configs/{model_config_id}
DELETE /v1/model-configs/{model_config_id} HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*

No content

Model Variants

Use model variant endpoints to discover public variants and retrieve the configuration_schema that defines the expected shape of model_configurations.

List all Model Variants

get

List all Model Variants. Public callers, including API-key-authenticated callers, only receive variants with status="public", ignoring other status filters.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Query parameters
model_idstringOptional

Filter model variants by parent model_id.

statusstringOptional

Filter by status.

tagsstring[]Optional

Filter model variants by a comma-separated list of tags (AND logic).

limitinteger · min: 1 · max: 100Optional

Number of items to return per page.

Default: 20
offsetintegerOptional

Number of items to skip for pagination.

Default: 0
Responses
200

A paginated list of model variants.

application/json
get/model-variants
GET /v1/model-variants HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "model_variant_id": "ojin/oris-1.0/standard",
      "model_id": "ojin/oris-1.0",
      "title": "Standard Quality",
      "description": {
        "resolution": "1024x1024"
      },
      "preview_media_url": "https://cdn.ojin.ai/previews/variant.jpg",
      "configuration_schema": {
        "type": "object",
        "properties": {
          "param1": {
            "type": "string"
          }
        }
      },
      "tags": [
        "general-purpose",
        "real-time"
      ],
      "status": "available",
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total_items": 150
  }
}

Retrieve a specific Model Variant

get

Retrieve a specific Model Variant by ID. Public callers, including API-key-authenticated callers, can retrieve the variant only if status="public". Otherwise returns 404.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
model_variant_idstringRequired

The unique identifier of the model variant.

Responses
200

Model Variant details.

application/json

Represents a specific variant of a Model.

model_variant_idstringRequired

Client-provided unique identifier (e.g., "ojin/oris-v1/standard").

Example: ojin/oris-1.0/standard
model_idstringRequired

Identifier of the parent Model. NOT NULL.

Example: ojin/oris-1.0
titlestringRequired

Display name for the variant. NOT NULL, unique per model_id.

Example: Standard Quality
preview_media_urlstring · url · nullableOptional

URL for a preview media.

Example: https://cdn.ojin.ai/previews/variant.jpg
tagsstring[]Required

List of descriptive tags. NOT NULL, defaults to '[]'.

Example: ["general-purpose","real-time"]
statusstringRequired

Status (e.g., 'available', 'deprecated'). NOT NULL. List managed in code.

Example: available
created_atstring · date-timeRead-onlyRequired

Timestamp of creation. Server-generated. Defaults to CURRENT_TIMESTAMP.

updated_atstring · date-timeRead-onlyRequired

Timestamp of last update. Server-generated. Auto-updates.

get/model-variants/{model_variant_id}
GET /v1/model-variants/{model_variant_id} HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "model_variant_id": "ojin/oris-1.0/standard",
  "model_id": "ojin/oris-1.0",
  "title": "Standard Quality",
  "description": {
    "resolution": "1024x1024"
  },
  "preview_media_url": "https://cdn.ojin.ai/previews/variant.jpg",
  "configuration_schema": {
    "type": "object",
    "properties": {
      "param1": {
        "type": "string"
      }
    }
  },
  "tags": [
    "general-purpose",
    "real-time"
  ],
  "status": "available",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Assets

Use asset endpoints to upload, register, retrieve, and delete media used by your Ojin integrations.

Initiate a Multipart Asset Upload

post

Starts the multipart asset upload process by creating a multipart upload session in S3. The Core API generates a unique asset_id and receives an upload_id from S3. Both IDs must be used in subsequent part signing and finalization requests. No Asset record is created in the database at this stage.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Body

Payload to initiate a multipart asset upload.

namestringRequired

Original filename of the asset.

Example: conference_highlights.mov
categorystringRequired

Category for the asset (e.g., 'video', 'image').

Example: video
content_typestring · nullableOptional

Client-declared MIME type of the file.

Example: video/quicktime
size_bytesinteger · int64 · nullableOptional

Client-declared file size in bytes.

Example: 52428800
Responses
200

Multipart upload initiated successfully. Returns asset_id and upload_id.

application/json

Response from initiating a multipart asset upload.

asset_idstring · uuidRequired

A unique ID generated by Core API for this asset transaction.

upload_idstringRequired

The multipart upload ID from S3, used to identify this multipart upload session.

s3_keystringOptional

The S3 key for this asset.

post/assets/initiate-upload
POST /v1/assets/initiate-upload HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 110

{
  "name": "conference_highlights.mov",
  "category": "video",
  "content_type": "video/quicktime",
  "size_bytes": 52428800
}
{
  "asset_id": "123e4567-e89b-12d3-a456-426614174000",
  "upload_id": "text",
  "s3_key": "text"
}

Get Pre-signed URL for Upload Part

post

Generates a pre-signed URL for uploading a specific part of a multipart upload. This endpoint will be called multiple times, once for each part of the file. Parts must be numbered sequentially starting from 1, and each part (except the last) must be at least 5MB in size (S3 requirement).

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Body

Payload to get a pre-signed URL for uploading a specific part of a multipart upload.

s3_keystringOptional

The S3 key for this asset.

asset_idstring · uuidRequired

The asset ID from the initiate upload response.

upload_idstringRequired

The multipart upload ID from the initiate upload response.

part_numberinteger · min: 1 · max: 10000Required

The part number for this upload part (1-10000).

Responses
200

Pre-signed URL generated successfully for the specified part.

application/json

Response containing the pre-signed URL for uploading a specific part.

upload_urlstring · urlRequired

The pre-signed S3 URL to PUT this specific part to.

part_numberintegerRequired

The part number this URL is for.

post/assets/sign-part
POST /v1/assets/sign-part HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 102

{
  "s3_key": "text",
  "asset_id": "123e4567-e89b-12d3-a456-426614174000",
  "upload_id": "text",
  "part_number": 1
}
{
  "upload_url": "text",
  "part_number": 1
}

Finalize Multipart Upload and Create Asset Record

post

Completes a multipart upload by combining all uploaded parts and creates the Asset metadata record in the Core API. The client must provide all part numbers and their corresponding ETags from the S3 upload responses. The Core API will complete the multipart upload in S3 and verify the final object before creating the database record.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Body

Payload to finalize a multipart asset upload and create the asset metadata record in DB.

asset_idstring · uuidRequired

The unique ID received from the 'initiate-upload' step.

upload_idstringRequired

The multipart upload ID from the 'initiate-upload' step.

namestringRequired

The original filename (must be consistent with initiate request).

categorystringRequired

The asset category (must be consistent with initiate request).

content_typestringRequired

Final confirmed MIME type of the asset.

size_bytesinteger · int64Required

Final confirmed size of the asset in bytes.

Responses
201

Multipart upload completed successfully and Asset record created in DB.

application/json

Represents a digital asset managed by the Core API.

asset_idstring · uuidRead-onlyRequired

Unique identifier for the Asset, generated during upload initiation.

Example: 123e4567-e89b-12d3-a456-426614174000
organization_idstringRead-onlyRequired

ID of the Organisation (from external IdP) that owns this Asset. Server-set.

Example: org_123abc
created_bystringRead-onlyRequired

User ID of the creator (from external IdP), or api_key:<id> when created via an API key. Server-set.

Example: user_789def
namestringRequired

The original file name of the Asset. NOT NULL.

Example: product_promo.mp4
categorystringRequired

Primary category of the Asset (e.g., 'video', 'image', 'weight'). NOT NULL. List of values managed in code.

Example: video
content_typestringRequired

The MIME type of the asset. NOT NULL.

Example: video/mp4
size_bytesinteger · int64Required

The size of the asset in bytes. NOT NULL.

Example: 10485760
etagstringRequired

The ETag of the S3 object, used for integrity checking. NOT NULL.

Example: "d41d8cd98f00b204e9800998ecf8427e"
created_atstring · date-timeRead-onlyRequired

Timestamp of when this Asset record was created (finalized). Server-generated. Defaults to CURRENT_TIMESTAMP.

updated_atstring · date-timeRead-onlyRequired

Timestamp of the last update to this Asset record. Server-generated. Auto-updates on modification.

asset_urlstring · uriRead-onlyOptional

A temporary, pre-signed URL to download the asset's content. This URL will expire.

Example: https://s3.amazonaws.com/ojin-assets/asset.mp4?X-Amz-Algorithm=...
post/assets
POST /v1/assets HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 181

{
  "asset_id": "123e4567-e89b-12d3-a456-426614174000",
  "upload_id": "text",
  "name": "text",
  "category": "text",
  "content_type": "text",
  "size_bytes": 1,
  "parts": [
    {
      "part_number": 1,
      "etag": "text"
    }
  ]
}
{
  "asset_id": "123e4567-e89b-12d3-a456-426614174000",
  "organization_id": "org_123abc",
  "created_by": "user_789def",
  "name": "product_promo.mp4",
  "category": "video",
  "content_type": "video/mp4",
  "size_bytes": 10485760,
  "etag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "asset_url": "https://s3.amazonaws.com/ojin-assets/asset.mp4?X-Amz-Algorithm=..."
}

List Assets

get

Retrieves a list of Asset metadata. By default returns only organization-owned assets. Use source='template' to retrieve template assets instead. Supports pagination and filtering by category and name.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Query parameters
sourcestring · enumOptional

Filter items by ownership source. Use 'org' for items owned by the user's organization, 'template' for items from the template organization. Defaults to 'org'.

Default: orgPossible values:
categorystringOptional

Filter assets by category.

namestringOptional

Filter assets by name (e.g., for partial match - specific behavior TBD by implementation).

limitinteger · min: 1 · max: 100Optional

Number of items to return per page.

Default: 20
offsetintegerOptional

Number of items to skip for pagination.

Default: 0
Responses
200

A paginated list of Asset metadata.

application/json
get/assets
GET /v1/assets HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "asset_id": "123e4567-e89b-12d3-a456-426614174000",
      "organization_id": "org_123abc",
      "created_by": "user_789def",
      "name": "product_promo.mp4",
      "category": "video",
      "content_type": "video/mp4",
      "size_bytes": 10485760,
      "etag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z",
      "asset_url": "https://s3.amazonaws.com/ojin-assets/asset.mp4?X-Amz-Algorithm=..."
    }
  ],
  "pagination": {
    "limit": 20,
    "offset": 0,
    "total_items": 150
  }
}

Retrieve Asset Metadata and Download URL

get

Retrieves metadata for a specific Asset, including a pre-signed URL for downloading the content. The user can access an asset if it belongs to their organization or to the shared template organization.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
asset_idstring · uuidRequired

The unique identifier (UUID) of the Asset.

Responses
200

Successfully retrieved Asset metadata, including a download URL.

application/json

Represents a digital asset managed by the Core API.

asset_idstring · uuidRead-onlyRequired

Unique identifier for the Asset, generated during upload initiation.

Example: 123e4567-e89b-12d3-a456-426614174000
organization_idstringRead-onlyRequired

ID of the Organisation (from external IdP) that owns this Asset. Server-set.

Example: org_123abc
created_bystringRead-onlyRequired

User ID of the creator (from external IdP), or api_key:<id> when created via an API key. Server-set.

Example: user_789def
namestringRequired

The original file name of the Asset. NOT NULL.

Example: product_promo.mp4
categorystringRequired

Primary category of the Asset (e.g., 'video', 'image', 'weight'). NOT NULL. List of values managed in code.

Example: video
content_typestringRequired

The MIME type of the asset. NOT NULL.

Example: video/mp4
size_bytesinteger · int64Required

The size of the asset in bytes. NOT NULL.

Example: 10485760
etagstringRequired

The ETag of the S3 object, used for integrity checking. NOT NULL.

Example: "d41d8cd98f00b204e9800998ecf8427e"
created_atstring · date-timeRead-onlyRequired

Timestamp of when this Asset record was created (finalized). Server-generated. Defaults to CURRENT_TIMESTAMP.

updated_atstring · date-timeRead-onlyRequired

Timestamp of the last update to this Asset record. Server-generated. Auto-updates on modification.

asset_urlstring · uriRead-onlyOptional

A temporary, pre-signed URL to download the asset's content. This URL will expire.

Example: https://s3.amazonaws.com/ojin-assets/asset.mp4?X-Amz-Algorithm=...
get/assets/{asset_id}/download
GET /v1/assets/{asset_id}/download HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "asset_id": "123e4567-e89b-12d3-a456-426614174000",
  "organization_id": "org_123abc",
  "created_by": "user_789def",
  "name": "product_promo.mp4",
  "category": "video",
  "content_type": "video/mp4",
  "size_bytes": 10485760,
  "etag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "asset_url": "https://s3.amazonaws.com/ojin-assets/asset.mp4?X-Amz-Algorithm=..."
}

Retrieve Asset Metadata

get

Retrieves metadata for a specific Asset, including a temporary pre-signed asset_url for download. The user can access an asset if it belongs to their organization or to the shared template organization.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
asset_idstring · uuidRequired

The unique identifier (UUID) of the Asset.

Responses
200

Successfully retrieved Asset metadata.

application/json

Represents a digital asset managed by the Core API.

asset_idstring · uuidRead-onlyRequired

Unique identifier for the Asset, generated during upload initiation.

Example: 123e4567-e89b-12d3-a456-426614174000
organization_idstringRead-onlyRequired

ID of the Organisation (from external IdP) that owns this Asset. Server-set.

Example: org_123abc
created_bystringRead-onlyRequired

User ID of the creator (from external IdP), or api_key:<id> when created via an API key. Server-set.

Example: user_789def
namestringRequired

The original file name of the Asset. NOT NULL.

Example: product_promo.mp4
categorystringRequired

Primary category of the Asset (e.g., 'video', 'image', 'weight'). NOT NULL. List of values managed in code.

Example: video
content_typestringRequired

The MIME type of the asset. NOT NULL.

Example: video/mp4
size_bytesinteger · int64Required

The size of the asset in bytes. NOT NULL.

Example: 10485760
etagstringRequired

The ETag of the S3 object, used for integrity checking. NOT NULL.

Example: "d41d8cd98f00b204e9800998ecf8427e"
created_atstring · date-timeRead-onlyRequired

Timestamp of when this Asset record was created (finalized). Server-generated. Defaults to CURRENT_TIMESTAMP.

updated_atstring · date-timeRead-onlyRequired

Timestamp of the last update to this Asset record. Server-generated. Auto-updates on modification.

asset_urlstring · uriRead-onlyOptional

A temporary, pre-signed URL to download the asset's content. This URL will expire.

Example: https://s3.amazonaws.com/ojin-assets/asset.mp4?X-Amz-Algorithm=...
get/assets/{asset_id}
GET /v1/assets/{asset_id} HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "asset_id": "123e4567-e89b-12d3-a456-426614174000",
  "organization_id": "org_123abc",
  "created_by": "user_789def",
  "name": "product_promo.mp4",
  "category": "video",
  "content_type": "video/mp4",
  "size_bytes": 10485760,
  "etag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "asset_url": "https://s3.amazonaws.com/ojin-assets/asset.mp4?X-Amz-Algorithm=..."
}

Delete an Asset

delete

Permanently deletes an Asset's metadata from the DB and its corresponding object from S3 (hard delete). This operation is restricted to assets owned by the user's organization and cannot be used on shared template assets.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
asset_idstring · uuidRequired

The unique identifier (UUID) of the Asset.

Responses
204

Operation successful, no content to return.

No content

delete/assets/{asset_id}
DELETE /v1/assets/{asset_id} HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*

No content

Generate idle video from image asset

post

Triggers background generation of an idle video from a source image asset using the ojin/oris-1.0 idle video generator.

The job runs asynchronously and returns a job_id for status tracking.

On completion, the generated video is saved as a new Asset in the organization. The result.asset_id field in the job object will contain the new asset ID.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Body

Request payload to trigger idle video generation.

source_asset_idstring · uuidRequired

The ID of the source image asset to use for generating the idle video.

Example: 123e4567-e89b-12d3-a456-426614174000
reference_templatestring · enumOptional

The reference motion template to use (e.g., 'v1', 'v2', 'v3').

Example: v1Possible values:
model_variant_idstring · max: 128Optional

Model variant the generated idle video is intended for (e.g. 'ojin/oris-portrait'). Used only to label the background job so the Recent Generations list names the right model. Optional; callers without a model context omit it and the job uses a default label.

Example: ojin/oris-portrait
target_model_config_idstring · uuidOptional

Model config to assign the generated video to as its active idle preview once the job completes. When set, core-api writes model_configurations.preview server-side on completion, so the assignment lands even if the browser closed, navigated away, or refreshed mid-generation. Must be a config owned by the caller's organization. Optional; omit to only create the video without assigning it.

Example: 123e4567-e89b-12d3-a456-426614174000
Responses
202

Job accepted and queued for processing.

application/json

Response from triggering idle video generation.

job_idstring · uuidRequired

Identifier of the background job created for this generation request.

Example: 123e4567-e89b-12d3-a456-426614174000
post/assets/generate/ojin/oris-1.0-idle-video-generator
POST /v1/assets/generate/ojin/oris-1.0-idle-video-generator HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 188

{
  "source_asset_id": "123e4567-e89b-12d3-a456-426614174000",
  "reference_template": "v1",
  "model_variant_id": "ojin/oris-portrait",
  "target_model_config_id": "123e4567-e89b-12d3-a456-426614174000"
}
{
  "job_id": "123e4567-e89b-12d3-a456-426614174000"
}

Agents

Use the agent endpoints to create and manage Human Agents — their configuration, publication status, third-party voice providers, and call history. These manage the persistent agent definition; to start a live session with a published agent, see the Session API Reference.

List Agents (org-scoped)

get
Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Query parameters
limitinteger · min: 1 · max: 100Optional

Number of items to return per page.

Default: 20
offsetintegerOptional

Number of items to skip for pagination.

Default: 0
Responses
200

Paginated list of Agents.

application/json
get/agents
GET /v1/agents HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "agent_id": "123e4567-e89b-12d3-a456-426614174000",
      "organization_id": "123e4567-e89b-12d3-a456-426614174000",
      "created_by": "text",
      "title": "text",
      "description": "text",
      "mode": "ojin",
      "status": "published",
      "face_id": "123e4567-e89b-12d3-a456-426614174000",
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 1,
    "total_items": 1
  }
}

Create a new Agent

post

Creates an Agent, optionally seeded from a preset. On creation the response includes auth_secret (one-shot) when auth_enabled is true.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Body

Payload for creating a new Agent, optionally from a preset.

titlestring · max: 255Required
modestring · enumOptional

The operating mode of an agent. Ojin mode uses the built-in pipeline; third_party mode delegates to an external STS provider.

Possible values:
preset_idstring · uuidOptional

Optional preset to seed the new agent from.

Responses
201

Agent created.

application/json

Full Agent detail including configuration, STS credentials flags, LLM tool wiring.

agent_idstring · uuidRead-onlyRequired
organization_idstring · uuidRead-onlyRequired
created_bystringRead-onlyRequired

Creator's user ID (from external IdP), or api_key:<id> when the resource was created via an API key.

titlestring · max: 255Required
descriptionstring · max: 1000 · nullableOptional
modestring · enumRequired

The operating mode of an agent. Ojin mode uses the built-in pipeline; third_party mode delegates to an external STS provider.

Possible values:
statusstring · enumRequired

The publication status of an agent. Published agents are available for connections; unpublished agents are not.

Possible values:
face_idstring · uuid · nullableRequired
created_atstring · date-timeRead-onlyRequired
updated_atstring · date-timeRead-onlyRequired
languagestring · enumRequired

Spoken language code for the agent. Drives Deepgram STT language, ElevenLabs voice filtering in the dashboard, and an LLM system-prompt suffix that pins the response language.

Possible values:
system_promptstring · max: 10000 · nullableOptional
tts_providerstringRequired
voice_idstring · max: 255 · nullableOptional
sts_providerstring · max: 100 · nullableOptional
sts_config_idstring · max: 255 · nullableOptional
sts_api_key_setbooleanRequired

True when an encrypted STS API key is persisted for this agent. The raw key is never returned.

preview_urlstring · max: 2048 · nullableOptional

A direct URL or a bare asset-ID UUID. The public agent endpoint resolves UUIDs to signed S3 URLs before returning them to clients.

starts_conversationbooleanRequired
session_limit_secondsinteger · min: 1 · max: 86400Required
max_concurrencyone ofRequired

Maximum concurrent sessions. -1 means unbounded (no limit); valid positive values are 1–100.

integer · enumOptionalPossible values:
or
integer · min: 1 · max: 100Optional
auth_enabledbooleanRequired
auth_secret_setbooleanRequired

True when an auth secret is persisted.

auth_secretstring · nullableOptional

Plaintext auth secret. Only returned to the creator immediately after agent creation (one-shot). Subsequent reads return null; use auth_secret_set to detect whether a secret is configured.

allowed_hostnamesstring[] · nullableOptional
post/agents
POST /v1/agents HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 81

{
  "title": "text",
  "mode": "ojin",
  "preset_id": "123e4567-e89b-12d3-a456-426614174000"
}
{
  "agent_id": "123e4567-e89b-12d3-a456-426614174000",
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_by": "text",
  "title": "text",
  "description": "text",
  "mode": "ojin",
  "status": "published",
  "face_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "language": "en",
  "system_prompt": "text",
  "tts_provider": "text",
  "voice_id": "text",
  "behaviour": {
    "greeting": "text",
    "greeting_reference": "text",
    "greeting_mode": "verbatim",
    "nudge_message": "text",
    "nudge_reference": "text",
    "nudge_mode": "verbatim",
    "farewell_message": "text",
    "farewell_reference": "text",
    "farewell_mode": "verbatim",
    "max_conversation_duration_seconds": 1,
    "inactivity_nudge_seconds": 1,
    "allow_interruption": true
  },
  "advanced": {
    "max_video_source_dimension": 1,
    "llm_max_tokens": 1
  },
  "sts_provider": "text",
  "sts_config_id": "text",
  "sts_api_key_set": true,
  "provider_config": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "preview_url": "text",
  "starts_conversation": true,
  "session_limit_seconds": 1,
  "max_concurrency": -1,
  "auth_enabled": true,
  "auth_secret_set": true,
  "auth_secret": "text",
  "allowed_hostnames": [
    "text"
  ],
  "tools": [
    {
      "tool_id": "123e4567-e89b-12d3-a456-426614174000",
      "enabled": true,
      "type": "function",
      "function": {
        "name": "text",
        "description": "text",
        "parameters": {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        }
      },
      "delivery": {
        "mode": "client"
      }
    }
  ]
}

Retrieve an Agent

get
Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
agent_idstring · uuidRequired

The unique identifier (UUID) of the Agent.

Responses
200

Agent detail.

application/json

Full Agent detail including configuration, STS credentials flags, LLM tool wiring.

agent_idstring · uuidRead-onlyRequired
organization_idstring · uuidRead-onlyRequired
created_bystringRead-onlyRequired

Creator's user ID (from external IdP), or api_key:<id> when the resource was created via an API key.

titlestring · max: 255Required
descriptionstring · max: 1000 · nullableOptional
modestring · enumRequired

The operating mode of an agent. Ojin mode uses the built-in pipeline; third_party mode delegates to an external STS provider.

Possible values:
statusstring · enumRequired

The publication status of an agent. Published agents are available for connections; unpublished agents are not.

Possible values:
face_idstring · uuid · nullableRequired
created_atstring · date-timeRead-onlyRequired
updated_atstring · date-timeRead-onlyRequired
languagestring · enumRequired

Spoken language code for the agent. Drives Deepgram STT language, ElevenLabs voice filtering in the dashboard, and an LLM system-prompt suffix that pins the response language.

Possible values:
system_promptstring · max: 10000 · nullableOptional
tts_providerstringRequired
voice_idstring · max: 255 · nullableOptional
sts_providerstring · max: 100 · nullableOptional
sts_config_idstring · max: 255 · nullableOptional
sts_api_key_setbooleanRequired

True when an encrypted STS API key is persisted for this agent. The raw key is never returned.

preview_urlstring · max: 2048 · nullableOptional

A direct URL or a bare asset-ID UUID. The public agent endpoint resolves UUIDs to signed S3 URLs before returning them to clients.

starts_conversationbooleanRequired
session_limit_secondsinteger · min: 1 · max: 86400Required
max_concurrencyone ofRequired

Maximum concurrent sessions. -1 means unbounded (no limit); valid positive values are 1–100.

integer · enumOptionalPossible values:
or
integer · min: 1 · max: 100Optional
auth_enabledbooleanRequired
auth_secret_setbooleanRequired

True when an auth secret is persisted.

auth_secretstring · nullableOptional

Plaintext auth secret. Only returned to the creator immediately after agent creation (one-shot). Subsequent reads return null; use auth_secret_set to detect whether a secret is configured.

allowed_hostnamesstring[] · nullableOptional
get/agents/{agent_id}
GET /v1/agents/{agent_id} HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "agent_id": "123e4567-e89b-12d3-a456-426614174000",
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_by": "text",
  "title": "text",
  "description": "text",
  "mode": "ojin",
  "status": "published",
  "face_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "language": "en",
  "system_prompt": "text",
  "tts_provider": "text",
  "voice_id": "text",
  "behaviour": {
    "greeting": "text",
    "greeting_reference": "text",
    "greeting_mode": "verbatim",
    "nudge_message": "text",
    "nudge_reference": "text",
    "nudge_mode": "verbatim",
    "farewell_message": "text",
    "farewell_reference": "text",
    "farewell_mode": "verbatim",
    "max_conversation_duration_seconds": 1,
    "inactivity_nudge_seconds": 1,
    "allow_interruption": true
  },
  "advanced": {
    "max_video_source_dimension": 1,
    "llm_max_tokens": 1
  },
  "sts_provider": "text",
  "sts_config_id": "text",
  "sts_api_key_set": true,
  "provider_config": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "preview_url": "text",
  "starts_conversation": true,
  "session_limit_seconds": 1,
  "max_concurrency": -1,
  "auth_enabled": true,
  "auth_secret_set": true,
  "auth_secret": "text",
  "allowed_hostnames": [
    "text"
  ],
  "tools": [
    {
      "tool_id": "123e4567-e89b-12d3-a456-426614174000",
      "enabled": true,
      "type": "function",
      "function": {
        "name": "text",
        "description": "text",
        "parameters": {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        }
      },
      "delivery": {
        "mode": "client"
      }
    }
  ]
}

Update an Agent (partial)

patch
Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
agent_idstring · uuidRequired

The unique identifier (UUID) of the Agent.

Body

Payload for updating an Agent (partial update — all fields optional).

titlestring · max: 255Optional
descriptionstring · max: 1000 · nullableOptional
modestring · enumOptional

The operating mode of an agent. Ojin mode uses the built-in pipeline; third_party mode delegates to an external STS provider.

Possible values:
face_idstring · uuid · nullableOptional
languagestring · enumOptional

Spoken language code for the agent. Drives Deepgram STT language, ElevenLabs voice filtering in the dashboard, and an LLM system-prompt suffix that pins the response language.

Possible values:
system_promptstring · max: 10000 · nullableOptional
tts_providerstring · enumOptionalPossible values:
voice_idstring · max: 255 · nullableOptional
sts_providerstring · max: 100 · nullableOptional
sts_api_keystring · max: 1000 · nullableWrite-onlyOptional
sts_config_idstring · max: 255 · nullableOptional
preview_urlstring · max: 2048 · nullableOptional

A direct URL or a bare asset-ID UUID. The public agent endpoint resolves UUIDs to signed S3 URLs before returning them to clients.

session_limit_secondsinteger · min: 1 · max: 86400Optional
max_concurrencyone ofOptional

Maximum concurrent sessions. -1 means unbounded (no limit); valid positive values are 1–100.

integer · enumOptionalPossible values:
or
integer · min: 1 · max: 100Optional
starts_conversationbooleanOptional
auth_enabledbooleanOptional
allowed_hostnamesstring[]Optional
Responses
200

Agent updated.

application/json

Full Agent detail including configuration, STS credentials flags, LLM tool wiring.

agent_idstring · uuidRead-onlyRequired
organization_idstring · uuidRead-onlyRequired
created_bystringRead-onlyRequired

Creator's user ID (from external IdP), or api_key:<id> when the resource was created via an API key.

titlestring · max: 255Required
descriptionstring · max: 1000 · nullableOptional
modestring · enumRequired

The operating mode of an agent. Ojin mode uses the built-in pipeline; third_party mode delegates to an external STS provider.

Possible values:
statusstring · enumRequired

The publication status of an agent. Published agents are available for connections; unpublished agents are not.

Possible values:
face_idstring · uuid · nullableRequired
created_atstring · date-timeRead-onlyRequired
updated_atstring · date-timeRead-onlyRequired
languagestring · enumRequired

Spoken language code for the agent. Drives Deepgram STT language, ElevenLabs voice filtering in the dashboard, and an LLM system-prompt suffix that pins the response language.

Possible values:
system_promptstring · max: 10000 · nullableOptional
tts_providerstringRequired
voice_idstring · max: 255 · nullableOptional
sts_providerstring · max: 100 · nullableOptional
sts_config_idstring · max: 255 · nullableOptional
sts_api_key_setbooleanRequired

True when an encrypted STS API key is persisted for this agent. The raw key is never returned.

preview_urlstring · max: 2048 · nullableOptional

A direct URL or a bare asset-ID UUID. The public agent endpoint resolves UUIDs to signed S3 URLs before returning them to clients.

starts_conversationbooleanRequired
session_limit_secondsinteger · min: 1 · max: 86400Required
max_concurrencyone ofRequired

Maximum concurrent sessions. -1 means unbounded (no limit); valid positive values are 1–100.

integer · enumOptionalPossible values:
or
integer · min: 1 · max: 100Optional
auth_enabledbooleanRequired
auth_secret_setbooleanRequired

True when an auth secret is persisted.

auth_secretstring · nullableOptional

Plaintext auth secret. Only returned to the creator immediately after agent creation (one-shot). Subsequent reads return null; use auth_secret_set to detect whether a secret is configured.

allowed_hostnamesstring[] · nullableOptional
patch/agents/{agent_id}
PATCH /v1/agents/{agent_id} HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 1071

{
  "title": "text",
  "description": "text",
  "mode": "ojin",
  "face_id": "123e4567-e89b-12d3-a456-426614174000",
  "language": "en",
  "system_prompt": "text",
  "tts_provider": "elevenlabs",
  "voice_id": "text",
  "behaviour": {
    "greeting": "text",
    "greeting_reference": "text",
    "greeting_mode": "verbatim",
    "nudge_message": "text",
    "nudge_reference": "text",
    "nudge_mode": "verbatim",
    "farewell_message": "text",
    "farewell_reference": "text",
    "farewell_mode": "verbatim",
    "max_conversation_duration_seconds": 1,
    "inactivity_nudge_seconds": 1,
    "allow_interruption": true
  },
  "advanced": {
    "max_video_source_dimension": 1,
    "llm_max_tokens": 1
  },
  "sts_provider": "text",
  "sts_api_key": "text",
  "sts_config_id": "text",
  "provider_config": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "preview_url": "text",
  "session_limit_seconds": 1,
  "max_concurrency": -1,
  "starts_conversation": true,
  "auth_enabled": true,
  "allowed_hostnames": [
    "text"
  ],
  "tools": [
    {
      "tool_id": "123e4567-e89b-12d3-a456-426614174000",
      "enabled": true,
      "type": "function",
      "function": {
        "name": "text",
        "description": "text",
        "parameters": {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        }
      },
      "delivery": {
        "mode": "client"
      }
    }
  ]
}
{
  "agent_id": "123e4567-e89b-12d3-a456-426614174000",
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_by": "text",
  "title": "text",
  "description": "text",
  "mode": "ojin",
  "status": "published",
  "face_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "language": "en",
  "system_prompt": "text",
  "tts_provider": "text",
  "voice_id": "text",
  "behaviour": {
    "greeting": "text",
    "greeting_reference": "text",
    "greeting_mode": "verbatim",
    "nudge_message": "text",
    "nudge_reference": "text",
    "nudge_mode": "verbatim",
    "farewell_message": "text",
    "farewell_reference": "text",
    "farewell_mode": "verbatim",
    "max_conversation_duration_seconds": 1,
    "inactivity_nudge_seconds": 1,
    "allow_interruption": true
  },
  "advanced": {
    "max_video_source_dimension": 1,
    "llm_max_tokens": 1
  },
  "sts_provider": "text",
  "sts_config_id": "text",
  "sts_api_key_set": true,
  "provider_config": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "preview_url": "text",
  "starts_conversation": true,
  "session_limit_seconds": 1,
  "max_concurrency": -1,
  "auth_enabled": true,
  "auth_secret_set": true,
  "auth_secret": "text",
  "allowed_hostnames": [
    "text"
  ],
  "tools": [
    {
      "tool_id": "123e4567-e89b-12d3-a456-426614174000",
      "enabled": true,
      "type": "function",
      "function": {
        "name": "text",
        "description": "text",
        "parameters": {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        }
      },
      "delivery": {
        "mode": "client"
      }
    }
  ]
}

Delete an Agent

delete

Deletes an Agent. Fails with 409 if there are active sessions for the agent.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
agent_idstring · uuidRequired

The unique identifier (UUID) of the Agent.

Responses
204

Operation successful, no content to return.

No content

delete/agents/{agent_id}
DELETE /v1/agents/{agent_id} HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*

No content

Publish or unpublish an Agent

patch
Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
agent_idstring · uuidRequired

The unique identifier (UUID) of the Agent.

Body

Payload for toggling Agent publication status.

statusstring · enumRequired

The publication status of an agent. Published agents are available for connections; unpublished agents are not.

Possible values:
Responses
200

Agent status updated.

application/json

Full Agent detail including configuration, STS credentials flags, LLM tool wiring.

agent_idstring · uuidRead-onlyRequired
organization_idstring · uuidRead-onlyRequired
created_bystringRead-onlyRequired

Creator's user ID (from external IdP), or api_key:<id> when the resource was created via an API key.

titlestring · max: 255Required
descriptionstring · max: 1000 · nullableOptional
modestring · enumRequired

The operating mode of an agent. Ojin mode uses the built-in pipeline; third_party mode delegates to an external STS provider.

Possible values:
statusstring · enumRequired

The publication status of an agent. Published agents are available for connections; unpublished agents are not.

Possible values:
face_idstring · uuid · nullableRequired
created_atstring · date-timeRead-onlyRequired
updated_atstring · date-timeRead-onlyRequired
languagestring · enumRequired

Spoken language code for the agent. Drives Deepgram STT language, ElevenLabs voice filtering in the dashboard, and an LLM system-prompt suffix that pins the response language.

Possible values:
system_promptstring · max: 10000 · nullableOptional
tts_providerstringRequired
voice_idstring · max: 255 · nullableOptional
sts_providerstring · max: 100 · nullableOptional
sts_config_idstring · max: 255 · nullableOptional
sts_api_key_setbooleanRequired

True when an encrypted STS API key is persisted for this agent. The raw key is never returned.

preview_urlstring · max: 2048 · nullableOptional

A direct URL or a bare asset-ID UUID. The public agent endpoint resolves UUIDs to signed S3 URLs before returning them to clients.

starts_conversationbooleanRequired
session_limit_secondsinteger · min: 1 · max: 86400Required
max_concurrencyone ofRequired

Maximum concurrent sessions. -1 means unbounded (no limit); valid positive values are 1–100.

integer · enumOptionalPossible values:
or
integer · min: 1 · max: 100Optional
auth_enabledbooleanRequired
auth_secret_setbooleanRequired

True when an auth secret is persisted.

auth_secretstring · nullableOptional

Plaintext auth secret. Only returned to the creator immediately after agent creation (one-shot). Subsequent reads return null; use auth_secret_set to detect whether a secret is configured.

allowed_hostnamesstring[] · nullableOptional
patch/agents/{agent_id}/status
PATCH /v1/agents/{agent_id}/status HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 22

{
  "status": "published"
}
{
  "agent_id": "123e4567-e89b-12d3-a456-426614174000",
  "organization_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_by": "text",
  "title": "text",
  "description": "text",
  "mode": "ojin",
  "status": "published",
  "face_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "language": "en",
  "system_prompt": "text",
  "tts_provider": "text",
  "voice_id": "text",
  "behaviour": {
    "greeting": "text",
    "greeting_reference": "text",
    "greeting_mode": "verbatim",
    "nudge_message": "text",
    "nudge_reference": "text",
    "nudge_mode": "verbatim",
    "farewell_message": "text",
    "farewell_reference": "text",
    "farewell_mode": "verbatim",
    "max_conversation_duration_seconds": 1,
    "inactivity_nudge_seconds": 1,
    "allow_interruption": true
  },
  "advanced": {
    "max_video_source_dimension": 1,
    "llm_max_tokens": 1
  },
  "sts_provider": "text",
  "sts_config_id": "text",
  "sts_api_key_set": true,
  "provider_config": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "preview_url": "text",
  "starts_conversation": true,
  "session_limit_seconds": 1,
  "max_concurrency": -1,
  "auth_enabled": true,
  "auth_secret_set": true,
  "auth_secret": "text",
  "allowed_hostnames": [
    "text"
  ],
  "tools": [
    {
      "tool_id": "123e4567-e89b-12d3-a456-426614174000",
      "enabled": true,
      "type": "function",
      "function": {
        "name": "text",
        "description": "text",
        "parameters": {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        }
      },
      "delivery": {
        "mode": "client"
      }
    }
  ]
}

List call history for an Agent

get
Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
agent_idstring · uuidRequired

The unique identifier (UUID) of the Agent.

Query parameters
limitinteger · min: 1 · max: 100Optional

Number of items to return per page.

Default: 20
offsetintegerOptional

Number of items to skip for pagination.

Default: 0
started_afterstring · date-timeOptional

ISO-8601 date/datetime lower bound on started_at.

started_beforestring · date-timeOptional

ISO-8601 date/datetime upper bound on started_at.

Responses
200

Paginated call history.

application/json
get/agents/{agent_id}/calls
GET /v1/agents/{agent_id}/calls HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "call_id": "123e4567-e89b-12d3-a456-426614174000",
      "agent_id": "123e4567-e89b-12d3-a456-426614174000",
      "organization_id": "123e4567-e89b-12d3-a456-426614174000",
      "session_id": "123e4567-e89b-12d3-a456-426614174000",
      "applied_session_limit_seconds": 1,
      "client_user_ref": "text",
      "started_at": "2026-01-01T00:00:00.000Z",
      "ended_at": "2026-01-01T00:00:00.000Z",
      "status": "text",
      "termination_reason": "text",
      "failure_reason": "text",
      "participant_count": 1,
      "metadata": {
        "ANY_ADDITIONAL_PROPERTY": "anything"
      }
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 1,
    "total_items": 1
  }
}

List STS providers

get

Lists available STS (speech-to-speech) providers and the fields each expects.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Responses
200

Provider catalogue.

application/json

STS provider descriptor (returned by GET /agents/providers).

slugstringRequiredExample: elevenlabs
labelstringRequiredExample: ElevenLabs
required_persistedstring[]Required

Provider-specific fields that must be persisted in provider_config.

optional_persistedstring[]Required

Provider-specific fields that may be persisted in provider_config.

session_fieldsstring[]Required

Provider-specific fields that must be supplied per-session.

statusstringRequiredExample: available
get/agents/providers
GET /v1/agents/providers HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*
[
  {
    "slug": "elevenlabs",
    "label": "ElevenLabs",
    "required_persisted": [
      "text"
    ],
    "optional_persisted": [
      "text"
    ],
    "session_fields": [
      "text"
    ],
    "status": "available"
  }
]

Verify third-party provider credentials for an Agent

post

Makes a live API call to the agent's configured STS provider using the stored API key and config ID. Returns whether the credentials are valid and any error detail. Does not modify the agent.

Authorizations
X-API-KeystringRequired

API key for authenticated access to the Ojin REST API.

Path parameters
agent_idstring · uuidRequired

The unique identifier (UUID) of the Agent.

Responses
200

Verification result (may be valid or invalid).

application/json

Result of a live credential verification check against a third-party STS provider.

validbooleanRequired
providerstringRequired
errorstringOptional

Human-readable reason when valid is false.

post/agents/{agent_id}/verify-provider
POST /v1/agents/{agent_id}/verify-provider HTTP/1.1
Host: api.ojin.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
  "valid": true,
  "provider": "text",
  "error": "text"
}

Public Widget Endpoints

These unauthenticated endpoints are intended for browser clients such as the Ojin widget.

Retrieve a Model Configuration (Public)

get

Retrieves a specific Model Configuration by ID. This is the public variant of GET /model-configs/{model_config_id}, designed for use by the Ojin widget embedded on third-party domains. Uses permissive CORS and requires no authentication. Resources are accessed by their UUID.

Internal fields (organization_id, created_by, model_id) are stripped from the response. The widget chains through model_variant_id and calls GET /public/model-variants/{model_variant_id} for catalog metadata (rendered frame size, etc.).

Path parameters
model_config_idstring · uuidRequired

The unique identifier (UUID) of the Model Configuration.

Responses
200

Model Configuration details (without internal fields).

application/json

Public variant of ModelConfig for widget embedding. Strips internal fields (organization_id, created_by, model_id) — the widget chains through model_variant_id and calls GET /public/model-variants/{model_variant_id} when it needs the parent Model reference.

model_config_idstring · uuidRead-onlyRequired

Server-generated unique ID.

model_variant_idstringRequired

ID of the ModelVariant being configured.

titlestringRequired

Title for the configuration.

created_atstring · date-timeRead-onlyRequired

Timestamp of creation.

updated_atstring · date-timeRead-onlyRequired

Timestamp of last update.

get/public/model-configs/{model_config_id}
GET /v1/public/model-configs/{model_config_id} HTTP/1.1
Host: api.ojin.ai
Accept: */*
{
  "model_config_id": "123e4567-e89b-12d3-a456-426614174000",
  "model_variant_id": "text",
  "title": "text",
  "model_configurations": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}

Retrieve Asset Metadata with Download URL (Public)

get

Retrieves metadata for a specific Asset, including a pre-signed download URL. This is the public variant of GET /assets/{asset_id}/download, designed for use by the Ojin widget embedded on third-party domains. Uses permissive CORS and requires no authentication. Resources are accessed by their UUID.

Internal fields (organization_id, created_by) are stripped from the response.

Path parameters
asset_idstring · uuidRequired

The unique identifier (UUID) of the Asset.

Responses
200

Successfully retrieved Asset metadata with download URL (without internal fields).

application/json

Public variant of Asset for widget embedding. Strips internal fields (organization_id, created_by) and includes a pre-signed download URL.

asset_idstring · uuidRead-onlyRequired

Unique identifier for the Asset.

Example: 123e4567-e89b-12d3-a456-426614174000
namestringRequired

The original file name of the Asset.

Example: product_promo.mp4
categorystringRequired

Primary category of the Asset (e.g., 'video', 'image', 'weight').

Example: video
content_typestringRequired

The MIME type of the asset.

Example: video/mp4
size_bytesinteger · int64Required

The size of the asset in bytes.

Example: 10485760
etagstringRequired

The ETag of the S3 object.

Example: "d41d8cd98f00b204e9800998ecf8427e"
created_atstring · date-timeRead-onlyRequired

Timestamp of creation.

updated_atstring · date-timeRead-onlyRequired

Timestamp of last update.

asset_urlstring · uriRead-onlyRequired

A temporary, pre-signed URL to download the asset's content. This URL will expire.

Example: https://s3.amazonaws.com/ojin-assets/asset.mp4?X-Amz-Algorithm=...
get/public/assets/{asset_id}
GET /v1/public/assets/{asset_id} HTTP/1.1
Host: api.ojin.ai
Accept: */*
{
  "asset_id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "product_promo.mp4",
  "category": "video",
  "content_type": "video/mp4",
  "size_bytes": 10485760,
  "etag": "\"d41d8cd98f00b204e9800998ecf8427e\"",
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "asset_url": "https://s3.amazonaws.com/ojin-assets/asset.mp4?X-Amz-Algorithm=..."
}

Schemas

Last updated

Was this helpful?