API Errors

A guide to HTTP errors and how to resolve them.


Go to Inference Status Messages for inference_status.

List of Possible Errors

Bad Request
(HTTP Status Code: 400)
The user-supplied input is not in the correct structure, or the API keys were left out of the x-api-id or x-api-secret headers.The text field in your request must be a string that is between one and 10,000 characters in length. In most cases, this error will display when the format of the request body does not match these constraints.

If this field is coded correctly, next check to be sure you have included the variables for your API keys in your x-api-id or x-api-secret headers, and that they are formatted properly (generate your API keys by logging in at app.science.io/login).

See below for a code sample in cURL that will help you understand headers.

If the error persists, make sure you did not omit any required fields, use an incorrect type (like passing a number value when text is expected), or use improperly formatted fields.
(HTTP Status Code: 401)
Your API credentials are incorrect.Re-enter your API_KEY_ID and API_KEY_SECRET. If this fails, generate new keys by logging in at app.science.io/login and then try again with your new credentials.
(HTTP Status Code: 403)
Your ScienceIO account has lapsed or you cancelled your subscription, so your API keys no longer work.Log in to your dashboard at app.science.io/login to check your account status and select an active service plan.
Not Found
(HTTP Status Code: 404)
The resource does not exist.Check your endpoint in POST to make sure the URL is correct. It should be: https://api.aws.science.io/v2/structure

Check the request_id in GET (https://api.aws.science.io/v2/structure/{request_id}) to make sure it is correct.
(HTTP Status Code: 410)
Your results have expired.Submit your request again, and be sure to retrieve the results within 24 hours.
Internal Server Error
(HTTP Status Code: 500)
The ScienceIO accounts service is down.Wait a few moments and try your request again. If the issue persists, try generating new API keys and resending your request before contacting our support team. You can generate new keys by logging in at app.science.io/login.
Service Unavailable
(HTTP Status Code: 503)
The API endpoint is down or inaccessible.Contact our support team to notify us of the error.
Gateway Timeout
(HTTP Status Code: 504)
ScienceIO was not able to complete the request within 30 seconds.Wait a few seconds to one minute and try again. If the error persists, contact our support team so we can investigate.

Headers in cURL

The x-api-id header corresponds with the variable for your ScienceIO API Key ID, and the x-api-secret header corresponds with the variable for your ScienceIO API Secret Key. Here is an example of a properly formatted header in cURL:

curl https://api.aws.science.io/v2/structure/<REQUEST_ID> \ 
  --request GET \
  --header "x-api-id: $SCIENCEIO_KEY_ID" \
  --header "x-api-secret: $SCIENCEIO_KEY_SECRET" \