Get Translated Story Status
Retrieves the current status of a story translation task using the specified task_id
.
Monitor the progress of your story translation tasks with our dedicated status tracking endpoint. This essential companion to our translation service lets you check on your story’s transformation journey in real-time, providing detailed information about which stage of the process your content has reached. By polling this endpoint, you can keep track of your translation progress and detect any issues that might arise during processing.
This endpoint works in conjunction with the /translated-story/{run_id}
endpoint, which initiates the translation process and provides the task_id
needed for status checks.
Understanding the Translation Pipeline
When you request a story translation, your content moves through several processing stages before completion. The status endpoint provides visibility into this journey, allowing you to:
- Confirm your translation request was successfully received and is being processed
- Monitor the progress as your story moves through different translation stages
- Identify when the translation is complete and ready for use
- Quickly detect and respond to any issues that might occur during processing
Having this level of insight helps you integrate story translations into your applications more effectively, allowing you to provide accurate progress updates to your users and plan subsequent workflows accordingly.
Implementing Status Checking
Here’s how to implement status checking in your application using Python:
Best Practices for Status Monitoring
To efficiently track your translation tasks, consider these professional recommendations:
-
Implement Exponential Backoff: Start with frequent checks that gradually increase in interval to avoid overloading the API. For example, begin with a 5-second interval, then double it each time until you reach a maximum of 2 minutes between checks.
-
Handle All Possible States: Ensure your code properly handles each possible status response, including unexpected values. This makes your integration robust against future API enhancements.
-
Set Reasonable Timeouts: For longer stories, translation may take significant time. Implement appropriate overall timeout periods based on the typical length of your content.
-
Persist Task IDs: Store task IDs securely in your database so you can resume status checking even if your application restarts or a user returns later.
-
Provide Meaningful Feedback: Translate technical status information into user-friendly messages that set appropriate expectations about completion time and next steps.
Troubleshooting Common Issues
If you encounter difficulties while checking translation status, consider these common solutions:
-
Invalid Task ID: Verify the task ID was correctly stored and passed to the status endpoint. Task IDs are case-sensitive and must be used exactly as provided.
-
Authentication Problems: Ensure your API key is valid and correctly included in the request headers.
-
Network Connectivity: Implement proper error handling for network issues that might interrupt status checking, including automatic retry logic.
-
Unexpected Terminal States: If a translation ends with an error status, examine the error message for specific issues that might be addressed in subsequent translation attempts.
By properly integrating status checking into your application, you can create a seamless translation experience that keeps your users informed throughout the entire process, building confidence in your service and ensuring the timely delivery of translated content.
Authorizations
The x-api-key
is a custom header required for authenticating requests to our API. Include this header in your request with the appropriate API key value to securely access our endpoints. You can find your API key(s) in the 'API' section of our studio website.
Path Parameters
This parameter represents a unique identifier for a task. It is used in various API endpoints to query the status or result of a specific task. The task_id
is typically returned when a task is created.
Response
Successful Response
The response is of type object
.