API
Results
✅ Successful Responses
A successful response looks like this:
It includes:
- status that contains a message about how many labels were found.
- labels array of JSON objs where each element includes:
label
: The text-label of a feature, characteristic, or detail from the image.confidence
: A float (typically between .7-.99). A higher confidence value corresponds to more certaintity the label is present in the image sent.
- labelsFound a boolean that can be used to confirm labels were found.
Typically a successful response will include 7-10 labels.
It is possible that the API will not find any relevant labels for an image, though it is very uncommon. Also, any API calls that do not find any labels will not be counted as bill-able API usage
❌ Unsuccessful Responses
NAME API returns errors in a similar style to successes to allow for easy and graceful error handling.
Each error includes:
- status That contains a message with pertainent info about the error.
- labels Empty array if an error occured.
- labelsFound Boolean which will be false if an error occured.
Some potential error statuses include:
🦄 Retry-able Errors
Almost all error statuses are indicitive of an invalid or incompatible request that won't change with a retry.
There is one exception to this in the case of Couldn't retrieve image from provided URL. Status: <Status_Code>
which indicates we weren't able to download the image located at the HTTPS/IPFS url provided in your request. You may re-try in cases of this error status a few times if desired.
🙈 Special Errors
In cases where no/an-invalid API key was provided, the NAME API returns an error message in raw-text of either:
- Unauthorized - Invalid or non-existent API key
- Unauthorized - This API key is disabled. You can re-enable or generate a new key at https://pulsr.ai/name
🤖 Debug
All API usage is tracked and you can check a full ledger of your API usage (successful/unsuccessful) from the developer dashboard. There you can see time-stamps, status messages, and labelFound status for all your requests.
Also feel free to reach out to us if you run into anything or need more info. Our discord is typically the fastest way to reach us.