Skip to main content
HappyOyster

HappyOyster Error Codes

HappyOyster Open API response structure and error codes, including business codes, typical scenarios, and handling suggestions.

This document describes the response structure and error codes of the HappyOyster Open API. It applies to all Open API endpoints of the Adventure, Directing, and Acting models.

Response structure

Once a request passes gateway authentication (for both business success and business errors), the response always returns HTTP 200 with the following JSON structure as the body:
{
  "code": 0,
  "message": null,
  "data": {}
}
FieldTypeDescription
codeintegerBusiness return code. 0 means success; a non-0 value means a business error — see the error code list below.
messagestring | nullHuman-readable error message. null when code=0.
dataobject | nullBusiness payload. On success, contains the endpoint-specific response object; on error, usually null.
Gateway-layer failures such as AK, signature, or timestamp verification are rejected directly, so those responses do not follow this structure and are typically returned with a 4xx / 5xx HTTP status code.

Error code list

codeDescriptionTypical scenarios & handling
0SuccessRequest succeeded; read data.
400000Invalid request parametersmode does not match the current model; prompt or firstFrameImage is missing; prompt is too long; creationModel / uploadMode / resolution / aspectRatio / perspective has an illegal value; image or encrypted ID format is invalid. Correct the parameters per the API doc and retry.
400001Failed to fetch or store image URLThe first-frame or reference image URL is inaccessible or expired. Verify URL accessibility and validity, then retry creating the World.
401010ticket invalid or expiredEnter travel (enter-travel). Call get-travel-credential again to obtain a new ticket.
401011ticket already usedEnter travel. The ticket is single-use; obtain a new one.
403001World does not exist, was deleted, does not belong to you, or does not belong to the current modelQuery, credential exchange, enter travel, and list filtering. On delete, this code is returned only for cross-account, cross-workspace, or cross-model IDs; an already-nonexistent ID under the same account returns code=0, deleted=false.
403002World is not ready or unavailableCredential exchange, enter travel. Poll the build status until ready before operating.
403003This endpoint allows the primary API Key onlyWorld management, Travel list, artifacts, etc. Call with the primary API Key (starts with sk-).
403004Input content failed the content-safety policyCreate World, send instruct. Adjust the text content and retry.
403005Input image failed copyright or IP verificationCreate World. Replace with a compliant image and retry.
403007Feature or service quota not enabledCreate, credential exchange, enter travel. Confirm the corresponding model capability is enabled.
403008Capacity configuration temporarily unavailableCreate, credential exchange, enter travel. Retry later or contact the service provider to scale up.
404000Travel does not exist, does not belong to you, does not belong to the current model, or has no available artifactsTravel status query, control, end, artifacts query.
409000Request conflicts with the current resource stateControl endpoints such as pause, resume, end, and instruct; also returned when calling an endpoint a model does not support.
429001Concurrency for the current spec is fullEnter travel. Retry later or raise the concurrency spec.
429002Insufficient available capacityEnter travel. Retry later.
500000Internal system errorUnclassified exceptions; may also be returned when calling an unsupported endpoint (e.g., rewind on some models).
500001Failed to allocate streaming resourcesEnter travel. Retry later.

Model isolation

To avoid revealing through the response whether another model's resource exists, cross-model access is uniformly treated as "not found":
  • The World side uniformly returns 403001.
  • The Travel side uniformly returns 404000.