Create a session
Create a session to obtain WebUI access information.
API description
Creates a session.
Prerequisites
You have integrated the AI Creation Workshop software development kit (SDK). For more information, see Legacy SDK reference.
Authorization method
AK/SK. To obtain an AK/SK pair, see API authorization.
Endpoint
https://openai.edu-aliyun.comRequest path
/scc/spCreateSessionRequest parameters
Name | Type | Required | Description | Example |
apiToken | string | Yes | The token. | 01j1w6cxqz**** |
roleId | string | No | The ID of the role attached to the session. | 01j2bapbjd**** |
sessionMode | integer | No | The session mode. Valid values: 10 for session mode and 20 for inference mode. The default is 10. | 10 |
subProduct | string | No | Subproducts: sd_webui, comfyui_api | Default: sd_webui, which creates a WebUI session. |
gadgetId | string | No | The gadget ID. | 01jddpbjd**** |
expiredInSeconds | long | No | The time-to-live (TTL) of the session in seconds. The default TTL is 1 hour for session mode and 24 hours for inference mode. | 3600 |
customResourceConfigId | string | No | The resource configuration ID. You can specify multiple IDs. Separate them with commas. |
If you specify multiple IDs for customResourceConfigId , see Resource pool configuration parameter format for the required format.
Response parameters
Name | Type | Description |
data | object | The returned data. |
data parameters
Name | Type | Description |
expiredAt | long | The time when the session expires. This is a 13-digit UNIX timestamp. |
apiToken | string | Token |
sessionUrl | string | The access URL. |
expiredInSeconds | long | The remaining validity period of the session in seconds. |