SeaCloud Model API
Model API provides different invocation protocols for different model types. Multimodal models usually use an asynchronous task protocol: create a task, poll its status, and retrieve the result. Large language models usually use synchronous or streaming protocols, returning text or incremental output within a single request.
SeaCloud LLM API is for Chat Completions, Anthropic Messages, and Responses API calls. Public endpoints use the unified /llm prefix, and the platform handles API Key authentication, balance checks, and request tracing.
Base URL
Section titled “Base URL”https://cloud.seaart.ai/llmCore endpoints
Section titled “Core endpoints”| Capability | Method | Path | Description |
|---|---|---|---|
| OpenAI Chat | POST | /v1/chat/completions | OpenAI-compatible chat completions |
| OpenAI Responses | POST | /openai/v1/responses | Recommended public path for Responses API |
| Anthropic Messages | POST | /v1/messages, /anthropic/v1/messages | Claude/Anthropic message protocol |
Quick call
Section titled “Quick call”export BASE_URL="https://cloud.seaart.ai/llm"export API_KEY="YOUR_API_KEY"
curl -sS "${BASE_URL}/v1/chat/completions" \ -H "Authorization: Bearer ${API_KEY}" \ -H "Content-Type: application/json" \ -H "X-Request-Id: demo-$(date +%s)" \ -d '{ "model": "gpt-4.1", "messages": [ { "role": "user", "content": "Introduce SeaCloud LLM API in one sentence" } ], "temperature": 0.7 }'from openai import OpenAI
client = OpenAI( api_key="YOUR_API_KEY", base_url="https://cloud.seaart.ai/llm/v1",)
response = client.chat.completions.create( model="gpt-4.1", messages=[ { "role": "user", "content": "Introduce SeaCloud LLM API in one sentence", } ],)
print(response.choices[0].message.content)Calling paths
Section titled “Calling paths”- Public calls should use full paths such as
/llm/v1/chat/completions,/llm/v1/messages,/llm/anthropic/v1/messages, or/llm/openai/v1/responses. - Response structures keep the corresponding API protocol format.
- This documentation only keeps the recommended public calling paths.
Multimodal models
Section titled “Multimodal models”Multimodal models use an asynchronous queue protocol: create a task, poll its status, and retrieve the result after completion. To stop execution, send a cancellation request. The endpoint in the URL directly uses the SeaCloud model ID, and the request body directly passes the model parameter object.
Lifecycle docs
Section titled “Lifecycle docs”Complete code example
Section titled “Complete code example”export BASE_URL="https://cloud.seaart.ai/model"export ENDPOINT="nano_banana_2"export API_KEY="YOUR_API_KEY"
COMMON_HEADERS=( -H "Authorization: Key ${API_KEY}" -H "Content-Type: application/json")
SUBMIT_RESPONSE="$(curl -sS -X POST "${BASE_URL}/v1/queue/${ENDPOINT}" \ "${COMMON_HEADERS[@]}" \ -d '{ "prompt": "a cinematic photo of a cat astronaut" }')"
echo "${SUBMIT_RESPONSE}" | jq .
REQUEST_ID="$(echo "${SUBMIT_RESPONSE}" | jq -r '.request_id')"STATUS_URL="$(echo "${SUBMIT_RESPONSE}" | jq -r '.status_url')"RESPONSE_URL="$(echo "${SUBMIT_RESPONSE}" | jq -r '.response_url')"
while true; do STATUS_RESPONSE="$(curl -sS "${STATUS_URL}" "${COMMON_HEADERS[@]}")" echo "${STATUS_RESPONSE}" | jq .
STATUS="$(echo "${STATUS_RESPONSE}" | jq -r '.status')" ERROR="$(echo "${STATUS_RESPONSE}" | jq -r '.error // empty')"
if [ "${STATUS}" = "COMPLETED" ]; then if [ -n "${ERROR}" ]; then echo "task failed: ${ERROR}" exit 1 fi break fi
sleep 3done
curl -sS "${RESPONSE_URL}" "${COMMON_HEADERS[@]}" | jq .import timeimport requests
BASE_URL = "https://cloud.seaart.ai/model"ENDPOINT = "nano_banana_2"API_KEY = "YOUR_API_KEY"
headers = { "Authorization": f"Key {API_KEY}", "Content-Type": "application/json",}
submit_resp = requests.post( f"{BASE_URL}/v1/queue/{ENDPOINT}", headers=headers, json={ "prompt": "a cinematic photo of a cat astronaut", }, timeout=30,)submit_resp.raise_for_status()submit_body = submit_resp.json()
request_id = submit_body["request_id"]status_url = submit_body["status_url"]response_url = submit_body["response_url"]
while True: status_resp = requests.get(status_url, headers=headers, timeout=30) status_resp.raise_for_status() status_body = status_resp.json()
status = status_body["status"] if status == "COMPLETED": if "error" in status_body: raise RuntimeError(f"{status_body.get('error_type')}: {status_body['error']}") break
time.sleep(3)
result_resp = requests.get(response_url, headers=headers, timeout=30)result_resp.raise_for_status()result_body = result_resp.json()
print("request_id:", request_id)print("result:", result_body)