Quick Start
Get up and running with the API in under 5 minutes.
Prerequisites
Before you begin, you'll need:
- An account with API access
- A workspace (created automatically on signup)
- cURL or any HTTP client
Create an API Key
Navigate to your workspace settings and create a new API key:
- Go to Settings → API Keys
- Click Create API Key
- Give it a name (e.g., "Development")
- Select the scopes you need (read, write, delete)
- Copy the key — it won't be shown again!
Important: Store your API key securely. Never commit it to version control or expose it in client-side code.
Make Your First Request
Let's verify your API key by searching agent memories:
curl --request POST \
--url 'https://api.lthn.ai/v1/brain/recall' \
--header 'Authorization: Bearer hk_your_api_key' \
--header 'Content-Type: application/json' \
--data '{"query": "hello world"}'
You should receive a response like:
{
"memories": [],
"scores": {}
}
Store a Memory
Now let's store your first memory in the brain:
curl --request POST \
--url 'https://api.lthn.ai/v1/brain/remember' \
--header 'Authorization: Bearer hk_your_api_key' \
--header 'Content-Type: application/json' \
--data '{
"content": "Go uses structural typing",
"type": "fact",
"tags": ["go", "typing"]
}'
This stores a fact in the vector database. You can then recall it with a semantic query.
Next Steps
Now that you've made your first API calls, explore more: