Unstructured API Key
Unstructured API key gives you access to the Unstructured Suite for analyzing text and image data. This key is different from model-specific API keys and is used for data processing tools.
How to Get Your Unstructured API Key
- Log into your Heimdall account
- Click on the account dropdown in the top right corner or in the sidebar
- Navigate to "API Keys"
- Click Generate to get a secure API key to access the Unstructured Suite
Important: Store Your API Key Securely
Unstructured API key is issued one time and cannot be retrieved. If you lose your API key, you'll need to generate a new one and update your applications.
What You Can Do with Your Unstructured API Key
Your single unstructured API key gives you access to:
- Text Analysis - Extract sentiment, topics, and insights from text data
- Image Analysis - Analyze images and extract features
Using Your Unstructured API Key
Include your unstructured API key in the headers of all API requests for both text and image analysis:
headers = {
'X-api-key': 'YOUR-UNSTRUCTURED-API-KEY',
'X-username': 'YOUR-USERNAME'
}
Expected Response
When you analyze text data, you'll receive a comprehensive analysis like this:
{
"length": 108,
"word_count": 17,
"oov_ratio": 0.17647058823529413,
"oov_ratio_2": 0.29411764705882354,
"sentence_count": 1,
"avg_word_length": 5.470588235294118,
"avg_sentence_length": 17,
"noun_count": 7,
"verb_count": 3,
"adjective_count": 2,
"adverb_count": 0,
"pronoun_count": 0,
"stopword_count": 5,
"tfidf_top1": "accessible",
"tfidf_top2": "amazing",
"tfidf_top3": "data",
"sentiment": "positive",
"compound_sentiment_score": 0.5859
}
Security Best Practices
- Never commit API keys to version control
- Use environment variables to store API keys
- Rotate keys regularly for security
Next Steps
Now that you have your unstructured API key:
- Make Your First API Call - Test the connection
- Start Processing Data - Begin analyzing your data