← Home

API Reference

Complete reference for all Elba endpoints. All agent-facing endpoints return JSON with CORS headers and are publicly accessible.

Base URL: https://useelba.com

Spec Management

Create, read, update, and manage your AgentSpecs.

POST/api/generate

Generate a new AgentSpec from raw text or OpenAPI input. Automatically extracts capabilities and reasoning docs.

Parameters
  • input (string)API description, OpenAPI spec, or plain English
Response
AgentSpec object with id, actions, capabilities, and docs
GET/api/docsCORS

List all specs. Returns an array of AgentSpec objects sorted by creation date.

Response
AgentSpec[]
GET/api/spec/{id}CORS

Get a single spec by ID. Returns the full AgentSpec with all actions and metadata.

Parameters
  • id (path)Spec ID
Response
AgentSpec object
POST/api/spec/{id}/update

Update spec name and description without regenerating.

Parameters
  • name (string, optional)New name
  • description (string, optional)New description
Response
Updated AgentSpec object
POST/api/spec/{id}/add-action

Generate and add a new action to an existing spec using AI.

Parameters
  • description (string)What the new action should do
Response
{ action: AgentAction, spec: AgentSpec }
POST/api/spec/{id}/regenerate-action

Regenerate an existing action with improved documentation using AI.

Parameters
  • actionName (string)Name of the action to regenerate
Response
{ action: AgentAction, spec: AgentSpec }
POST/api/spec/{id}/remove-action

Remove an action from a spec. Cannot remove the last action.

Parameters
  • actionName (string)Name of the action to remove
Response
{ removed: string, spec: AgentSpec }

Publishing

Publish specs to custom subdomains.

POST/api/publish

Publish a spec to a custom subdomain. Validates subdomain uniqueness.

Parameters
  • id (string)Spec ID
  • subdomain (string)Desired subdomain
  • siteTitle (string, optional)Site display title
  • brandColor (string, optional)Hex color
  • isPublic (boolean, optional)Visibility
Response
Updated AgentSpec object (409 if subdomain taken)
GET/api/subdomain-check

Check if a subdomain is available.

Parameters
  • subdomain (query)Subdomain to check
  • excludeId (query, optional)Spec ID to exclude
Response
{ available: boolean, subdomain: string }

Agent Discovery

Endpoints agents use to find and understand your API.

GET/.well-known/agent.jsonCORS

Well-known agent discovery endpoint. Lists all published specs with capabilities and discovery URLs.

Response
Agent discovery manifest with tools array
GET/api/agent/{id}CORS

Per-spec agent.json with full details. Tracks agent_fetch analytics events.

Parameters
  • id (path)Spec ID
Response
Agent JSON payload with version, capabilities, actions, and discovery URLs
GET/api/mcp/{id}CORS

MCP server config for a spec. Each action becomes a typed MCP tool.

Parameters
  • id (path)Spec ID
Response
MCP server config with tools and input schemas
GET/api/registryCORS

Full tool registry. Lists all specs with capabilities.

Response
{ tools: [{ name, description, capabilities, agent_json_url }] }
GET/api/agent-searchCORS

Search specs by capability. Weighted scoring by name (10x), capability (8x), description (5x), action (4x).

Parameters
  • q (query)Search query
Response
{ tools: [{ name, description, capabilities, score, agent_json_url }] }
GET/llms.txt

LLM context file listing all APIs, endpoints, and capabilities. Follows the emerging llms.txt standard.

Response
Plain text

Embed & Analytics

Embed your docs anywhere and track usage.

GET/api/embed/{id}

JavaScript snippet that renders an embeddable iframe of your spec. Include as a script tag on any page.

Parameters
  • id (path)Spec ID
Response
application/javascript
GET/api/analytics/{id}

Get analytics for a spec — views, agent fetches, search hits, MCP downloads.

Parameters
  • id (path)Spec ID
Response
{ views, agent_fetches, search_hits, mcp_fetches, total, last_accessed }
GET/api/dashboard

Aggregated analytics across all specs.

Response
{ specs: [{ id, name, published, subdomain, analytics }] }

Playground

Execute prompts against a spec.

POST/api/run

Run a natural language prompt against a spec. Maps the prompt to an action and returns mock output.

Parameters
  • prompt (string)Natural language prompt
  • specId (string)Spec ID
Response
{ action: string, inputs: object, output: object }
POST/api/search

Human-facing search. Returns specs matching a query.

Parameters
  • query (string)Search query
Response
{ results: [{ doc_id, name, description, capabilities, score }] }