All Products
Search
Document Center

Intelligent Media Management:CreateStory

Last Updated:Jan 27, 2026

Creates a story.

Operation description

  • Before calling this operation, understand the billing methods and pricing of Intelligent Media Management (IMM).

  • Before calling this operation, index files to a dataset by calling CreateBinding, IndexFileMeta, or BatchIndexFileMeta.

  • This is an asynchronous operation. After a task starts, its information is saved for only 7 days. The information cannot be retrieved after this period. Call GetTask or ListTasks with the returned TaskId to view task information. Alternatively, set the Notification parameter to obtain task information from notification messages.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

imm:CreateStory

create

*Dataset

acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}/dataset/{#DatasetName}

None None

Request parameters

Parameter

Type

Required

Description

Example

ProjectName

string

Yes

The name of the project. For more information, see Create a project.

test-project

DatasetName

string

Yes

The name of the dataset. For more information, see Create a dataset.

test-dataset

ObjectId

string

No

The ID for the story object. This parameter is optional. If you do not specify an ID, IMM generates one. You can use the story ID to query or update the story. If you specify an ID that already exists, the corresponding story is updated.

id1

StoryType

string

Yes

The type of the story to generate. For more information about story types and their valid values, see Story types and subtypes.

PeopleMemory

StorySubType

string

No

The subtype of the story to generate. For more information about story subtypes and their valid values, see Story types and subtypes.

Solo

StoryStartTime

string

No

The start time of the photo collection for the story. This parameter and StoryEndTime define a time range. IMM filters candidate photos within this time range to generate the story. The value must be a string in the RFC 3339 format.

2016-12-30T16:00:00Z

StoryEndTime

string

No

The end time of the photo collection for the story. This parameter and StoryStartTime define a time range. IMM filters candidate photos within this time range to generate the story. The value must be a string in the RFC 3339 format.

2021-12-30T16:00:00Z

StoryName

string

No

The name of the story.

name1

MinFileCount

integer

No

The minimum number of photos in the generated story. The actual number of photos is between the values of MinFileCount and MaxFileCount. The value must be an integer greater than 1. If the number of available candidate photos is less than this value, an empty story is returned.

1

MaxFileCount

integer

No

The maximum number of photos in the generated story. The actual number of photos is between the values of MinFileCount and MaxFileCount. The value must be an integer greater than the value of MinFileCount. To ensure the quality of the generated story, the internal algorithm limits the maximum number of photos to 1,500. If you set MaxFileCount to a value greater than 1,500, the setting does not take effect.

3

NotifyTopicName

string

No

The name of the topic for asynchronous notifications.

test-topic

CustomLabels

object

No

The custom labels. These labels contain custom information about the story and can be used for retrieval.

{"Bucket": "examplebucket"}

CustomId

string

No

A custom identifier for the story. This ID can be different from ObjectId. You can use this ID to retrieve or sort stories.

test

Address AddressForStory

No

The address information for the story. IMM filters photos whose shooting locations match the specified address to generate the story. This parameter takes effect only when StoryType is set to TravelMemory.

Note

Due to regulatory requirements, parsing GPS information into addresses is not supported in Hong Kong (China), Macao (China), Taiwan (China), or regions outside of mainland China.

Tags

object

No

This parameter provides a tagging mechanism that can be used in the following scenarios:

  • Set custom data that is returned in MNS messages.

  • Use as a search condition to search for tasks.

  • Use as a variable in TargetURI.

{"key":"val"}

UserData

string

No

The custom information that is returned in an asynchronous notification message. You can use this information to associate the notification message with your services. The maximum length is 2,048 bytes.

{"ID": "testuid","Name": "test-user","Avatar": "http://test.com/testuid"}

Notification Notification

No

The notification configuration. For more information about the format of asynchronous notification messages, see Asynchronous notification message format.

Response elements

Element

Type

Description

Example

object

The schema for the response.

RequestId

string

The ID of the request.

1B3D5E0A-D8B8-4DA0-8127-ED32C851****

TaskId

string

The ID of the task.

CreateStory-4ef6ff43-edf3-4612-9cc4-0c7f9e19****

EventId

string

The ID of the event.

392-1CqzvESGTEeNZ2OWFbRKIM****

Examples

Success response

JSON format

{
  "RequestId": "1B3D5E0A-D8B8-4DA0-8127-ED32C851****",
  "TaskId": "CreateStory-4ef6ff43-edf3-4612-9cc4-0c7f9e19****",
  "EventId": "392-1CqzvESGTEeNZ2OWFbRKIM****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.