Updated on 2025-08-13 GMT+08:00

Obtaining a Prompt

Function

Obtain a prompt.

URI

GET /v1/{project_id}/applications/{application_id}/uni-search/prompt/{prompt_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details about how to obtain the project ID, see Obtaining a Project ID.

Constraints:

N/A

Value range:

The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

Default value:

N/A

application_id

Yes

String

Definition:

Application ID. For details about how to obtain the application ID, see Obtaining an Application ID.

Constraints:

Character string

Value range:

The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter.

Default value:

N/A

prompt_id

Yes

String

Definition:

Prompt ID.

Constraints:

N/A

Value range:

Length: 1 to 64 characters. The value can contain only digits, letters, hyphens (-), and underscores (_).

Default value:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition:

Token used for API authentication. For details about how to obtain the token, see Obtaining an IAM User Token.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

id

String

Definition:

Prompt ID.

Value range:

N/A

name

String

Definition:

Prompt name.

Value range:

N/A

detail

String

Definition:

Prompt description.

Value range:

N/A

create_time

String

Definition:

Time when a prompt is created. The value is a 13-digit timestamp.

Value range:

N/A

update_time

String

Definition:

Prompt update time, which is a 13-digit timestamp.

Value range:

N/A

type

String

Definition:

Prompt types

DEFAULT_CHAT_PROMPT: default RAG prompt

DEFAULT_QA_ANSWER_PROMPT: default QA answer generation prompt

The DEFAULT_QA_QUESTION_PROMPT: default QA question generation prompt

CHAT_PROMPT: RAG prompt

QA_QUESTION_PROMPT: QA answer generation prompt

QA_ANSWER_PROMPT: QA question generation prompt

MLLM_PROMPT: multimodal model prompt.

Value range:

  • DEFAULT_CHAT_PROMPT: default RAG prompt

  • DEFAULT_QA_ANSWER_PROMPT: default QA answer generation prompt

  • DEFAULT_QA_QUESTION_PROMPT: default QA question generation prompt

  • CHAT_PROMPT: RAG prompt

  • QA_QUESTION_PROMPT: QA answer generation prompt

  • QA_ANSWER_PROMPT: QA question generation prompt

  • MLLM_PROMPT: multimodal model prompt.

knowledge_repos

Array of KnowledgeRepoItem objects

Definition:

Knowledge base associated with the prompt.

Value range:

N/A

prompts

Array of PromptItem objects

Definition:

List of different prompt languages. The list can contain a maximum of 20 items.

Value range:

N/A

Table 4 KnowledgeRepoItem

Parameter

Type

Description

id

String

Definition:

Knowledge base ID.

Value range:

N/A

name

String

Definition:

Knowledge base name.

Value range:

N/A

Table 5 PromptItem

Parameter

Type

Description

language

String

Definition:

Language name.

Constraints:

N/A

Value range:

  • zh==CHINESE

  • en==ENGLISH

  • th==THAI

  • ar==ARABIC

  • es==SPANISH

  • pt==PORTUGUESE

Default value:

N/A

prompt

String

Definition:

Prompt.

Constraints:

N/A

Value range:

The value contains a maximum of 8,192 characters.

Default value:

N/A

attention

String

Definition:

Notes.

Constraints:

N/A

Value range:

The maximum length is 65,535 characters.

Default value:

N/A

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error Code.

Value range:

N/A

error_msg

String

Definition:

Error message.

Value range:

N/A

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error Code.

Value range:

N/A

error_msg

String

Definition:

Error message.

Value range:

N/A

Example Requests

Obtaining a Prompt by prompt_id

/v1/{project_id}/applications/{application_id}/uni-search/prompt/{prompt_id}

Example Responses

None

Status Codes

Status Code

Description

200

Response body for modifying a prompt.

400

Incorrect request body parameter.

500

Internal error.

Error Codes

See Error Codes.