API overview

Updated at:

API standards and multilingual preset SDKs

The OpenAPI of this product (AiMiaoBi/2023-08-01) uses the RPC signature style. We have encapsulated SDKs for common programming languages for developers. Developers can download the SDK to directly call this product's OpenAPI without worrying about technical details. If the existing SDK does not meet your needs, you can use the signature mechanism for self-signing integration. Since the details of self-signing are very complex, it may take around 5 business days. Therefore, we recommend joining our DingTalk service group (147535001692) and conducting signature integration under expert guidance.

Before using the API, you need to prepare your identity account and access key (AccessKey) to effectively access the API through client tools (such as SDK and CLI). For details, see Obtain an AccessKey.

Custom signature scenarios

If your business scenario has special requirements and you need to integrate the API through self-signing, we recommend consulting our technical support team first (DingTalk service group: 147535001692) to obtain professional guidance and ensure efficient integration.

Account and security preparation

Alibaba Cloud accounts have full administrative permissions over all resources. Once an AccessKey is compromised, all associated resources will be at risk of unauthorized access. To ensure security, it is recommended to create a RAM user with only API access permissions and configure its AccessKey, while configuring RAM policies based on the principle of least privilege (PoLP). Use the Alibaba Cloud account only in specific scenarios where Alibaba Cloud account permissions are explicitly required.

API catalog

API

Title

Description

AddAuditTermsAdd a custom word library recordAdd a custom term to the audit dictionary.
AddDatasetDocumentData Source - Add Document to DatasetAdds a document to a data source.
AsyncCreateClipsTaskCreate video editing jobCreates a video clip.
AsyncCreateClipsTimeLineCreation of video editing voice-over timelineCreates a timeline for smart video editing.
AsyncEditTimelineEdit the voice-over timeline for video editingEdits the timeline of a video editing task.
AsyncUploadTenderDocTender document parsingUpload a tender document.
AsyncUploadVideoAsynchronously upload video clip materialsUploads video assets for editing.
AsyncWritingBiddingDocBid Document WritingAn API for writing bidding documents.
BindPptArtifactAttach PPT work informationBinds a PowerPoint (PPT) artifact.
CancelAsyncTaskCancel asynchronous taskCancels pending asynchronous tasks.
CancelAuditTaskCancel a review jobCancel an audit task.
CancelDeepWriteTaskCancel a depth writing jobCancels a deep writing task.
ClearIntervenesPurge all intervention itemsClears all intervention content.
ConfirmAndPostProcessAuditNoteConfirm Submission of Rule Library for ReviewThis interface confirms whether the parsing results from your custom rule library submission are used for audit tasks. Because parsing results may not meet your requirements, use this interface to perform a second confirmation. If you are satisfied with the parsing of your submitted rule library, provide the TaskId from that submission as an input parameter. The system then post-processes your uploaded rule library and makes it available for auditing. Otherwise, invoke the SubmitAuditNote interface again to upload the modified rule library.
CreateDataPermissionsCreateDataPermissionsBatch add permissions:\ \- Dataset permissions\
CreateDatasetData source - CreationCreates a dataset.
CreateGeneralConfigGeneral Configuration - CreationGeneral configurations — Create
CreateGeneratedContentSave DocumentSaves an article created in Miaobi. This operation supports rich text.
CreateTokenObtain an authorization tokenCreates a temporary token for the online inference API.
DeleteAuditNoteDelete Rule LibraryDeletes all custom rule libraries available for audit under the user account. This operation is irreversible. To archive rule libraries, use the DownloadAuditNote API to save them before deletion.
DeleteAuditTermsDelete the specified dictionary recordDeletes specified term records.
DeleteCustomTextDelete custom textDeletes a custom text.
DeleteCustomTopicByTopicDelete custom hot spot management eventDelete a custom hot spot event by topic name.
DeleteCustomTopicViewPointByIdDelete Custom Topic PerspectiveDeletes a custom topic viewpoint by its ID.
DeleteDataPermissionsDeleteDataPermissionsBatch delete dataset permissions
DeleteDatasetData Source - DeleteDeletes a dataset from the data source.
DeleteDatasetDocumentData Source - Delete Dataset DocumentDelete source documents.
DeleteDocsBatch delete documentsDeletes multiple documents.
DeleteFactAuditUrlDelete Factuality Review URLDeletes the specified URL used for factuality audit.
DeleteGeneralConfigGeneral Configuration - DeleteDeletes general configurations.
DeleteGeneratedContentDelete DocumentDeletes an article created in MiaoBi.
DeleteInterveneRuleDelete intervention rulesDeletes an intervention rule.
DeleteMaterialByIdDelete MaterialDeletes a material from the material library.
DeletePptArtifactDelete a PPT workDelete a PPT work
DeleteStyleLearningResultDelete Custom writing styleDeletes a specified custom style.
DocumentExtractionDocument fetchExtracts the content of documents from URLs.
DownloadAuditNoteDownload Rule LibraryCall this API to download the structured rule library for further processing. You can use this API to download either the structured rule library before post-processing or the structured rule library currently available for auditing. For specific usage, see the input parameter descriptions.
DownloadBiddingDocDownload Bid Document FileAPI for downloading bidding documents
EditAuditTermsEdit a custom dictionary recordEdit custom audit term records.
EditBiddingDocEdit tender document contentEdits the content of a bidding document.
ExportAnalysisTagDetailByTaskIdExport label mining resultsExports the tag details for a specified enterprise VOC analysis task.
ExportAuditContentResultExport automated review reportExports an automated review report.
ExportCustomSourceAnalysisTaskExport Custom Source – Topic Analysis Job ResultExports custom data source topic perspective analysis task results.
ExportGeneratedContentExport DocumentExports the history of articles created in MiaoBi.
ExportHotTopicPlanningProposalsExport topic planning documentExports topic planning documents and provides a publicly accessible URL that expires in one hour.
ExportIntervenesExport intervention item contentExports all interventions.
ExportPptArtifactExport PPT workExports a PPT artifact.
FeedbackDialogueSubmit Conversation FeedbackProvides feedback on the quality of the content that the model generates.
FetchExportTermsTaskObtain the result of a vocabulary export jobRetrieves the results of a term library export task.
FetchExportWordTaskObtain the result of a document export jobFetches the result of an asynchronous document export task.
FetchImageTaskRetrieve Image Job Execution ResultRetrieve the results of image generation tasks.
FetchImportTermsTaskObtain the result of the import dictionary jobRetrieves the result of a term import task.
GenerateExportWordTaskGenerate a job to export a documentStart a task to export content as a Word document.
GenerateFileUrlByKeyGenerate File URLGenerate a temporary public URL.
GenerateImageTaskGenerate Intelligent Image Generation JobAsynchronously generates an image from text.
GenerateUploadConfigGenerate upload configurationGenerates a file upload configuration. 1\. Call this API to obtain the upload configuration. The API returns the `PostUrl` (an internal OSS address for AI Writing Assistant), temporary OSS authentication information (`key`, `OSSAccessKeyId`, `Signature`, and `policy`), and the unique file identifier `fileKey`. 2\. The client uses the `PostUrl` and the temporary authentication information (`key`, `OSSAccessKeyId`, `Signature`, and `policy`) to upload the file. 3\. Use the `fileKey` to call subsequent APIs that require a `fileKey`, such as `GenerateFileUrlByKey`.
GenerateViewPointGenerate topic perspectivesGenerates viewpoints from article snippets.
GetAuditNotePostProcessingStatusRetrieve the post-processing progress of the rule libraryQueries the progress of a post-processing task for a rule library. Use this operation together with the ConfirmAndPostProcessAuditNote operation to check the status of the current post-processing task.
GetAuditNoteProcessingStatusQuery the upload status of a rule libraryChecks the processing status of an uploaded rule library. This operation returns the current status of the upload task, the size of the parsed rule library file, and its storage path.
GetAutoClipsTaskInfoObtain video editing Job informationRetrieves the status of a video editing task.
GetAvailableAuditNotesQuery active rule librariesQuery the rule libraries that are currently available for audit. This operation returns only rule libraries that are active for auditing. To view the contents of a custom rule library, use the DownloadAuditNote API.
GetBiddingDocInfoObtain Bid Writing ResultRetrieves the generation results of a bidding document.
GetBiddingRemainLimitNumObtain the remaining quota for tender document writingRetrieve the remaining limit for the bidding feature.
GetCategoriesByTaskIdRetrieve categorization list by job IDRetrieves the classifications from a tag mining task.
GetClipsBuildInResourceRetrieve Intelligent Video Editing built-in resourcesRetrieves the built-in resources for smart clipping.
GetCustomHotTopicBroadcastJobRetrieve Custom Broadcast Job ResultRetrieves the result of a custom hot topic broadcast job.
GetCustomSourceTopicAnalysisTaskRetrieve Custom Source Topic Analysis Job ResultRetrieves the results of a topic analysis task for a custom data source.
GetCustomTextRetrieve custom textRetrieve custom text.
GetCustomTopicSelectionPerspectiveAnalysisTaskObtain Custom Viewpoints Analysis Job ResultRetrieve the result of a custom topic selection perspective analysis task.
GetDataSourceOrderConfigObtain data source configuration weight dataRetrieves configuration information for write data sources and general search data sources.
GetDatasetData Source - DetailsData source management details.
GetDatasetDocumentData Source - Retrieve Document DetailsRetrieve the data source document.
GetDeepWriteTaskQuery depth writing jobQueries deep writing tasks. You can use it to check the running status of a specific task.
GetDeepWriteTaskResultQuery the result of a depth writing JobQueries the result of a deep writing task. If the task is not complete, the operation returns its current status—such as queued, running, failed, or canceled. If the task is complete, the operation returns a URL that points to a compressed package of the task output that you can download.
GetDocClusterTaskObtain content aggregation job resultRetrieves the result of a content aggregation task.
GetDocInfoRetrieve document informationRetrieves information about a document.
GetEnterpriseVocAnalysisTaskRetrieve Enterprise VOC Mining Job ResultRetrieves the result of an enterprise Voice of the Customer (VOC) analysis task.
GetFactAuditUrlRetrieve Factuality Review URLsRetrieves the source URL that is currently used for factuality audit.
GetFileContentLengthGet Document LengthMiaoRead calculates the word count for a document.
GetGeneralConfigGeneral Configuration - DetailsQueries general configurations.
GetGeneratedContentRetrieve documentGet generated content. Queries the history of articles generated in MiaoBi.
GetHotTopicBroadcastquery full broadcast list (hot list)Query news broadcast orders.
GetInterveneGlobalReplyObtain global intervention reply contentRetrieve the global intervention reply.
GetInterveneImportTaskInfoObtain the import job information for an intervention projectGets information about an import task.
GetInterveneRuleDetailObtain details of an intervention ruleRetrieves the details of an intervention rule.
GetInterveneTemplateFileUrlObtain the URL of the intervention import template fileRetrieves the download URL for the intervention import template.
GetMaterialByIdRetrieve MaterialRetrieves detailed information about a material from the Material Library.
GetPptArtifactGetPptArtifactQueries information about a PPT artifact.
GetPptArtifactExportResultQuery the result of a PPT export taskRetrieves the result of a PPT export task.
GetPptConfigObtain PPT widget configurationRetrieves the configuration of a PPT component.
GetPptInfoGetPptInfoGets information about a PPT task.
GetPptTemplateSelectorQuery PPT template filterRetrieves the filters for PowerPoint (PPT) templates.
GetPropertiesRetrieve Configuration InformationRetrieves configuration information, such as intelligent configuration styles and inference-related metadata configurations.
GetSmartAuditResultQuery Intelligent Review ResultQueries the result of an automated review.
GetSmartClipTaskGet Intelligent Video Editing Job ResultQueries a one-click video editing task.
GetStyleLearningResultRetrieve Style Learning Analysis ResultRetrieves the analysis result of a style learning task.
GetTopicByIdRetrieve hot spot objectRetrieve hot topic event information by ID.
GetTopicSelectionPerspectiveAnalysisTaskObtain Job Result of Subject Perspective AnalysisRetrieves the result of a topic selection perspective analysis task.
ImportInterveneFileSynchronize and import an intervention item fileImports an intervention file.
ImportInterveneFileAsyncAsynchronously import an intervention item fileAsynchronously import an intervention file.
InitiatePptCreationInitialize a session for PPT creationImportant: This is a billable API operation. This API performs two operations: 1\. Returns the initialization code for the "PPT Generation" frontend component. 2\. Performs billing.
InitiatePptCreationV2InitiatePptCreationV2Starts a task to create a presentation.
InsertInterveneGlobalReplyInsert global intervention response itemSets global intervention replies.
InsertInterveneRuleInsert intervention ruleInsert an intervention rule.
ListAnalysisTagDetailByTaskIdRetrieve Tag Analysis Details List by Job IDRetrieves a paginated list of details for an enterprise Voice of the Customer (VOC) analysis task.
ListAsyncTasksRetrieve asynchronous task listRetrieves a list of asynchronous tasks.
ListAuditContentErrorTypesObtain the review dimension listRetrieves a list of audit dimensions.
ListAuditTermsRetrieve custom dictionary recordsRetrieve a list of term libraries.
ListAutoClipsTaskListAutoClipsTaskLists smart video editing tasks.
ListBiddingDocList Bid Writing JobsRetrieves the list of bidding document writing tasks.
ListBuildConfigsRetrieve system custom presetsRetrieves the system-defined presets for the Generate Content workflow. These presets include options such as writing style, article length, output language, and the number of articles to generate.
ListCustomTextRetrieve the Custom Text ListRetrieve a list of custom texts.
ListCustomViewPointsRetrieve Custom Viewpoint ListLists custom viewpoints.
ListDataPermissionsListDataPermissionsPermission to list datasets
ListDatasetDocumentsData Source - Document ListLists data source documents.
ListDatasetsData Source - ListData source management - query
ListDialoguesGeneration History ListHistory of online inference scenarios.
ListDocsList DocumentsMiàodú retrieves the list of documents.
ListDocumentRetrieveOfficial Document Repository SearchSearches government document libraries based on complex conditions.
ListEnterprisePptTemplatesListEnterprisePptTemplatesLists the enterprise-specific PPT templates.
ListFreshViewPointsRetrieve a list of novel perspectivesList of novel perspectives.
ListGeneralConfigsCommon Configuration - ListLists the general configurations.
ListGeneratedContentsRetrieve document listRetrieve a list of documents: Query the history of articles created in MiaoBi.
ListHotNewsWithTypeRetrieve a list of hot spot topicsRetrieves a list of trending news topics.
ListHotSourcesRetrieve the list of third-party trending sourcesRetrieve the list of hot ranking sources for all platforms.
ListHotTopicsRetrieve hot spot topic listRetrieve the hot spot topic list.
ListHotViewPointsRetrieve Hot Perspectives ListList of popular viewpoints.
ListInterveneCntObtain the quantity of all intervention itemsLists the number of intervention projects.
ListInterveneImportTasksList import jobs for intervention itemsRetrieve a list of import tasks.
ListInterveneRulesList intervention rulesRetrieves a list of intervention rules.
ListIntervenesList intervention itemsRetrieves the list of intervention items.
ListMaterialDocumentsRetrieve Material ListRetrieve the list of materials from the Material Library.
ListPlanningProposalRetrieve topic planning listRetrieves a list of planning proposals.
ListPptArtifactsListPptArtifactsQueries a list of PPT artifacts.
ListPptTemplatesQuery PPT template listQueries a list of PowerPoint templates.
ListSearchTaskDialogueDatasQuery the data list in the details of a search-generated JobLists the dialogue data for a search generation task.
ListSearchTaskDialoguesQuery the list of MiaoSousuo search generation job detailsRetrieves the task details for MiaoSou search generation tasks.
ListSearchTasksQuery the History Job List of Miaosou Search and GenerationQueries the list of historical tasks generated by Miaosou Search.
ListStyleLearningResultRetrieve the list of style learning analysis resultsRetrieves the list of style learning analysis results.
ListTimedViewAttitudeRetrieve Timeliness Perspective ListList of timeliness perspectives.
ListTopicRecommendEventListRetrieve the list of hot spot recommendation management eventsRetrieve hot spot recommendation events.
ListTopicViewPointRecommendEventListRetrieve the list of recommended viewpoints for hot spot eventsRetrieves recommended viewpoints for hot spot events.
ListVersionsObtain version informationRetrieve version information for your purchased services.
ListWebReviewPointsRetrieve the list of netizen perspectivesList of viewpoints from netizens.
ListWritingStylesRetrieve the list of writing stylesRetrieves the list of writing styles.
QueryAsyncTaskQuery asynchronous task detailsQueries the details of submitted asynchronous task executions.
QueryAuditTaskQuery review resultQueries the results of an audit task.
QueryVideoAuditResultQueryVideoAuditResultQueries video audit results.
RunAbbreviationContentContent AbbreviationAbbreviates the specified content.
RunAiHelperWritingAI Writing AssistantMiaoBi: AI-assisted writing
RunBookBrainmapBook Mind MapMiaodu generates mind maps of books.
RunBookIntroductionBook Introduction (Extract Book Selling Points / Book Summary)Extracts a summary, structured selling points, and hotwords from a book.
RunBookSmartCardIntelligent Book CardA smart card interface for books.
RunCommentGenerationCustomer Voice PredictionPredicts user comments for a specified article.
RunContinueContentContent CompletionContinues generating content.
RunCustomHotTopicAnalysisCustom Hot Spot Topic AnalysisAnalyzes custom hot topics.
RunCustomHotTopicViewPointAnalysisCustom Subject Perspective AnalysisPerspective analysis of custom topics.
RunDeepWritingQuery deep writing management eventsQueries deep writing events. The system returns detailed information about the task execution as a stream of Server-Sent Events (SSE).
RunDocBrainmapFull-text mind mapGenerate a three-level, multilingual mind map from an article or a book, with control over the number of second-level nodes and the word count of leaf nodes.
RunDocIntroductionDocument SummaryGenerates a summary for an article, video, or URL, including a full-text summary, key points, and a chapter overview (i.e., segmented content with summaries and abstracts for each segment). It also supports multilingual input and output. If the user only requires a full-text summary of an article, they can use the RunDocSummary API. For details, see https://help.aliyun.com/zh/model-studio/api-aimiaobi-2023-08-01-rundocsummary.
RunDocQaDocument Q&A (Article Q&A / Multimodal File Q&A)Article Q&A: For a natural language query, provide a textual answer within the specified article scope (accompanied by images if available) and display source attribution information. Multimodal File Q&A: For a natural language query, provide a textual answer within the specified multimodal file scope, along with relevant images, video segments, or text, and display source attribution information.
RunDocSmartCardDocument Mind CardAutomatically adds tags to selected text or a specified chat and generates a smart card note.
RunDocSummaryDocument summaryGenerates a summary of an article, video, or URL—that is, a concise overview of the entire content. It also supports multilingual input and output.
RunDocTranslationDocument TranslationAn API for document translation between English and Chinese.
RunDocWashingRewriteRewrites an article in a specified style.
RunExpandContentContent ExpansionExpands content.
RunGenerateQuestionsQuestions You Might Want to AskSubmits a query and returns several related queries.
RunHotwordExtract KeywordsExtract keywords from a specified document. Keywords are domain-specific professional terms or concepts that represent and identify a particular industry or field. They accurately describe and summarize the core content, key people, major events, or technical terms in that domain.
RunKeywordsExtractionGenerationKeyword ExtractionExtracts and generates keywords using AMB.
RunMultiDocIntroductionMulti-document aggregation summaryGenerate an outline-style summary for multiple documents, videos, or URLs. The summary includes a consolidated overview and key points. This operation supports multiple input and output languages.
RunPptOutlineGenerationGenerate PPT outline contentGenerates a PowerPoint outline.
RunQuickWritingQuick WritingEnter writing instructions to quickly generate content.
RunSearchGenerationMiaoSou - Intelligent SearchAI Miaosou – Intelligent Search Generation: This API delivers the search and generation capabilities of the Miaosou homepage. It supports general search and media asset search, along with features such as user query clarification, multimodal knowledge search, and multi-agent generation. – General Search: Performs semantic retrieval on centralized knowledge data and applies multi-agent post-processing to the results, such as summary generation, abstracting, and timeline summarization. – Media Asset Search: Conducts an exhaustive full-text search to retrieve highly relevant knowledge and supports multi-agent post-processing, such as clustering and news extraction.
RunSearchSimilarArticlesMiaoSou - Text SearchMiao Search enables text-to-text search.
RunStepByStepWritingStep-by-step writingWrites content in a step-by-step pattern using an outline and summaries.
RunStyleFeatureAnalysisContent Characteristics AnalysisAnalyzes the stylistic features of content.
RunSummaryGenerateSummary GenerationGenerates a summary of content.
RunTextPolishingPolishPolishes the specified text.
RunTitleGenerationTitle GenerationMiaobi generates titles.
RunTopicSelectionMergeTopic Hot Spot FusionSelects and aggregates topics for MiaoCe.
RunTranslateGenerationChinese-English TranslationTranslates text for content creation using AMB.
RunVideoScriptGenerateAI-generated video editing scriptGenerates video clip scripts using AI.
RunWriteToneGenerationWriting Style RewritingCalls AMB to rewrite text in a new tone.
RunWritingDirect WritingDirect writing.
RunWritingV2Intelligent WritingAI writing
SaveCustomTextSave custom textSaves custom text.
SaveDataSourceOrderConfigSave datasource weight configurationSaves the data source configuration for content creation and general search.
SaveMaterialDocumentSave MaterialSave material: Save material to the Material Library.
SaveOrUpdateOssConfigConfiguration - Cloud Storage - Parameter SettingsConfiguration: Cloud storage parameter settings
SaveStyleLearningResultSave the writing style learning analysis resultSaves a custom writing style.
SearchDatasetDocumentsdata source - search documentSearches documents in a data source.
SearchNewsInformation retrievalSearches for news based on your input. This feature is currently limited to web search.
SubmitAsyncTaskSubmit asynchronous JobExecutes predefined asynchronous tasks.
SubmitAuditNoteSubmit Custom Rule LibraryModel Studio provides the same feature as the Intelligent Proofreading module in Alibaba Cloud public cloud: uploading a custom rule library. Due to authentication restrictions, you must pass the file key (FileKey) of your custom rule library file as an input parameter to successfully call this API. After you call this API, Model Studio processes your custom rule library and returns a structured result in XLSX format. You can call GetAuditNoteProcessingStatus to check the processing status or call DownloadAuditNote to download the processed rule library. This API is under active development and will eventually accept a publicly accessible file URL instead of a FileKey.
SubmitAuditTaskSubmit a review jobSubmits an audit task.
SubmitCustomHotTopicBroadcastJobSubmit a custom broadcast jobYou can submit a custom broadcast list job.
SubmitCustomSourceTopicAnalysisSubmit a topic selection analysis job from a Custom sourceSubmits a task to analyze hot topics from a custom data source.
SubmitCustomTopicSelectionPerspectiveAnalysisTaskSubmit a Custom hot spot topic perspective Analysis JobSubmits a custom analysis task to analyze hot topic perspectives.
SubmitDeepWriteTaskSubmit a depth writing jobYou can submit a deep writing task. You can provide information such as questions, instructions, and attachments, based on the topic you want to research or analyze. The system schedules and executes this task in the background.
SubmitDocClusterTaskSubmit a content aggregation jobSubmits a content clustering task.
SubmitEnterpriseVocAnalysisTaskSubmit an enterprise VOC analysis jobSubmits a Voice of the Customer (VOC) asynchronous task.
SubmitExportTermsTaskSubmit export term library jobExport task for a thesaurus
SubmitFactAuditUrlSubmit Factuality Review URLMiaoBi provides a factuality audit capability that verifies facts using web search and supports custom configuration of search source URLs.
SubmitImportTermsTaskSubmit a vocabulary import jobSubmit a custom dictionary import task.
SubmitSmartAuditSubmit an Intelligent Review jobSubmit a smart audit request.
SubmitSmartClipTaskSubmit an Intelligent One-Click Video Editing JobSubmits a one-click video editing task.
SubmitTopicSelectionPerspectiveAnalysisTaskSubmit a topic hot spot analysis jobSubmits a hot spot analysis task for topic selection.
SubmitVideoAuditSubmitVideoAuditSubmits a video for review.
UpdateCustomTextUpdate custom textUpdates custom text.
UpdateDatasetData source – ModificationThis operation updates a data source.
UpdateDatasetDocumentData Source – Modify DocumentUpdates a document in a dataset.
UpdateGeneralConfigGeneral Configuration - ModifyUpdates general configurations.
UpdateGeneratedContentUpdate DocumentUpdates the history of an article created in AiMiaoBi.
UpdateMaterialDocumentUpdate MaterialUpdate a material in the Material Library.
UploadBookBook UploadUse MiaoDu to upload books.
UploadDocDocument UploadUpload document API for Miaodu.
ValidateUploadTemplateValidate VOC upload templateValidates an enterprise VOC upload template.