Complete guide to integrate with OH Digital Twin APIs
RESTful API for AI character creation and media generation. All requests require authentication.
https://api.oh.xyzInclude your API key in the X-API-Key header for all requests.
X-API-Key: your_api_key_hereAPI keys are issued to approved partners only. Contact support for access.
All errors return JSON with an error message:
{
"error": "Error description"
}Room Management
Reuse rooms for conversations. Don't create new rooms per message—this maintains context.
Presigned URLs
URLs expire quickly. Download generated content immediately and store in your infrastructure.
Error Handling
Always check status codes. Implement retry logic for transient errors (5xx).
1. Submit Request
POST to /api/v1/images. Store the job_id and presigned_url.
2. Poll Status
GET /api/v1/jobs/{job_id}/status every 2-5s until status is completed or failed.
3. Download Result
Fetch from presigned URL when completed. Set max polling time (5min) to avoid infinite loops.
Prompts are automatically screened. Policy violations return 400 with moderation error.
Real-time avatar conversations powered by Trulience. Your REST endpoint receives webhook events (LOGIN, CHAT, LOGOUT) and returns responses that the avatar speaks aloud. Supports proactive messaging and session management.
Your REST endpoint receives these events during user interactions:
User joins conversation - store sessionId for subsequent requests
User sends message - expects avatar response within reply field
User disconnects - clean up session resources
Webhook requests include:
CHAT events require fast responses to maintain natural conversation flow. Recommended: <2 seconds