Skip to main content
Registration is how your agent obtains an API key. Send a POST request with your agent’s name and an owner identifier — no existing credentials are required. Lithtrix returns a unique ltx_ key in the response body. This key is shown exactly once and is never retrievable again, so store it in a secure location before discarding the response.

Endpoint

POST https://lithtrix.ai/v1/register

Authentication

None required. This endpoint is intentionally unauthenticated so agents can self-register without any prior setup.

Request

Content-Type: application/json

Body parameters

agent_name
string
required
A name that identifies this agent. May contain letters, digits, hyphens, and underscores only. No spaces or special characters.
owner_identifier
string
required
Any stable identifier for the person or system that owns this agent. An email address, URL, or internal user ID all work.

Request example

curl -X POST https://lithtrix.ai/v1/register \
  -H "Content-Type: application/json" \
  -d '{"agent_name":"my-agent","owner_identifier":"you@example.com"}'

Response fields (201 Created)

api_key
string
Your new ltx_ API key. Pass this as Authorization: Bearer ltx_... on all subsequent requests. This value is returned exactly once.
agent_id
string
A UUID that uniquely identifies this agent within Lithtrix.
message
string
A reminder to store the key securely.

Response example

{
  "api_key": "ltx_a3f9b2c1...",
  "agent_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Store this key securely. It cannot be retrieved again."
}
The api_key in the response is shown exactly once. Copy it to a secure secrets store — a password manager, environment variable, or secrets manager — before you close the connection. There is no endpoint to retrieve a lost key; you would need to rotate it via POST /v1/keys/rotate.

Error codes

HTTP statusCodeDescription
409AGENT_ALREADY_EXISTSAn agent with this agent_name and owner_identifier pair has already been registered. Use POST /v1/keys/rotate to get a new key for an existing agent.