Unstructured API key
Time to complete: ~2 minutes
The unstructured API key gives you access to Read (text analysis) and Vision (image analysis). It is separate from per-model keys used by ML, Forecast, and Loop.
Before you start
- Heimdall account
- You need Read/Vision only — skip this page if you are doing tabular ML via Lake
How to get your key
- Sign in at heimdallapp.org
- Either:
- Sidebar footer → Looking for unstructured? (opens Settings), or
- Sidebar → Account → API keys (
/settings?section=api-keys)
- Click Generate under the unstructured key section
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
Lake vs unstructured key
| Need | Use |
|---|---|
| One text/image per API call | This key → Read/Vision |
| Thousands of files for ML training | Lake → Add data → Unstructured zip — no unstructured key required for ingest |
Next steps
- First API call
- Unstructured suite overview
- Tabular ML? → User journeys (Lake path, not this key)