canonical: https://jentic.com/apis/amazonaws.com/lex-models

# AWS Amazon Lex Model Building Service

Jentic publishes the only available OpenAPI specification for Amazon Lex Model Building Service, keeping it validated and agent-ready. The Lex Model Building Service is the v1 control plane for designing conversational bots: defining intents, slot types, slots, and bot aliases that route conversation traffic to specific bot versions. Its 42 endpoints cover intent and slot type lifecycle, bot version management, channel associations for Facebook and Slack, import and export jobs, migration to Lex v2, and tagging. The runtime API for end-user conversations is separate.

## For AI agents

Design and version conversational bots, intents, slot types, and channel integrations for Amazon Lex v1.

## Scope

Does not handle end-user conversation runtime, voice synthesis, or speech-to-text - use for Lex v1 bot authoring, versioning, and channel configuration only.

## Capabilities

- Design intents with utterances and slots via /intents/{name}/versions
- Define and version custom slot types via /slottypes/{name}/versions
- Create and update bots with /bots/{name}/versions
- Associate bots with Facebook, Slack, and Twilio SMS channels
- Run import and export jobs to move bot definitions across accounts
- Initiate migrations of v1 bots to Amazon Lex v2
- Manage bot aliases that route runtime traffic

## Use cases

### Customer Support Chatbot Design

Build a customer support bot that recognises intents such as Refund, OrderStatus, and FAQ, with slots for order numbers and dates. The Lex Model Building Service stores intent utterances, slot types, and fulfilment configurations, then publishes immutable bot versions that can be promoted via aliases. Teams iterate on language without redeploying downstream Lambda fulfilment code.

Example prompt: Create an intent named 'OrderStatus' on bot 'support-bot' with utterances 'where is my order' and 'check order status' and slot orderNumber of type AMAZON.AlphaNumeric

### Multi-Channel Bot Deployment

Publish a single bot to multiple channels - Facebook Messenger, Slack, and Twilio SMS - through bot channel associations. The /bots/{botName}/aliases/{aliasName}/channels endpoints record the channel credentials and routing, after which Lex handles message translation and lifecycle on each channel. This avoids writing per-channel adapters by hand.

Example prompt: Create a Slack channel association for bot 'support-bot' alias 'prod' with workspace and bot tokens stored in Secrets Manager

### Bot Definition Backups and Migrations

Export bot definitions for version control or migration to a new account. The /exports endpoints serialise bot, intent, and slot type definitions to JSON or ZIP, while /imports reverses the process. The /migrations endpoints initiate a migration of a v1 bot to the v2 console, returning a migration ID that can be polled until completion.

Example prompt: Initiate a migration of bot 'support-bot' alias 'prod' from Lex v1 to Lex v2 using migration strategy CREATE_NEW

### AI Agent Conversational Design Operations

AI agents call Lex Model Building through Jentic to author new intents when product features ship, retire stale slots, and migrate v1 bots to v2 in bulk. Through Jentic, the agent searches by intent, loads the operation schema, and executes with credentials kept in the vault. SigV4 signing happens inside Jentic so the agent runtime stays slim.

Example prompt: Search Jentic for 'create lex intent', load the PutIntent schema, and create intent 'CancelSubscription' with three sample utterances

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| PUT | /bots/{name}/versions/$LATEST | Create or update a bot |
| POST | /bots/{name}/versions | Publish a new bot version |
| PUT | /intents/{name}/versions/$LATEST | Create or update an intent |
| PUT | /slottypes/{name}/versions/$LATEST | Create or update a slot type |
| POST | /bots/{botName}/aliases/{aliasName}/channels/{name} | Associate a channel with a bot alias |
| POST | /migrations | Start a v1 to v2 migration |

## Key resources

- **Bots** — Create, version, and configure Lex v1 bots
- **Intents** — Author intent utterances, slots, and fulfilment hooks
- **Slot Types** — Define custom and built-in slot types for entity capture
- **Aliases and Channels** — Route traffic via aliases and integrate channels
- **Imports, Exports, and Migrations** — Move definitions across accounts and migrate to Lex v2

## Why Jentic

- **Setup:** Wiring the Lex Model Building API by hand means building AWS Signature Version 4 signing, selecting the right regional host from models.lex.{region}.amazonaws.com, tracking bot and intent checksums, and handling AWS throttling and retries yourself. Through Jentic you install once, import Amazon Lex Model Building Service from the API Directory, store the AWS access key and secret once, and your agent calls it.
- **Permission scoping:** Lex Model Building puts the resource name in the URL path (/bots/{name}/..., /intents/{name}/..., /slottypes/{name}/...), so a rule can pin your agent to one bot: it can read and version that bot and nothing else. You choose the operations it may call, so destructive ones like DeleteBot or DeleteIntent are not included unless you add them.
- **Credential handling:** Your AWS access key and secret for Lex are stored once, encrypted, by your own Jentic One instance and signed with SigV4 at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a lex chatbot intent' or 'publish a lex bot version', and Jentic returns the matching Lex Model Building operation with its input schema so the agent calls the right endpoint without reading the AWS reference.

## Related APIs

- **Amazon Lex Model Building V2** — Newer v2 of the Lex bot authoring API
- **Amazon Lex Runtime V2** — Send user utterances to a published Lex v2 bot
- **Amazon Polly** — Neural text-to-speech
- **Amazon Comprehend** — Natural language processing for text analysis

## FAQ

### Why is there no official OpenAPI spec for Amazon Lex Model Building Service?

AWS does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Amazon Lex Model Building Service via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Lex Model Building API use?

The API uses AWS Signature Version 4 (SigV4) HMAC request signing scoped to the lex IAM service. Through Jentic, AWS credentials sit in the encrypted vault and signing happens at execution time so the agent never sees the raw secret.

### Can I author chatbot intents with the Lex Model Building API?

Yes. PUT /intents/{name}/versions/$LATEST creates or updates an intent definition with sample utterances, slots, and fulfilment activity. Custom slot types live under /slottypes and built-in types like AMAZON.AlphaNumeric are referenced by name.

### How do I publish a new bot version through Jentic?

Search Jentic for 'publish lex bot version', load the schema for POST /bots/{name}/versions, submit the bot name with the desired checksum, and Jentic will sign and execute the call. Promote that version with an alias update via PUT /bots/{botName}/aliases/{name}.

### What are the rate limits for the Lex Model Building API?

Per-region quotas apply, including default caps on bots, intents, slot types per account, and TPS limits on control plane operations. Check the Lex service quotas in the AWS console for the current values in your account.

### Does this API run end-user conversations?

No. This API only manages the bot model. Use the Amazon Lex Runtime API to send user utterances to a published bot and receive responses. The Model Building API and the Runtime API are deliberately separate.

### Can I migrate a Lex v1 bot to Lex v2?

Yes. POST /migrations starts a migration with a chosen strategy such as CREATE_NEW or UPDATE_EXISTING and returns a migration ID. Poll GET /migrations/{migrationId} until status is COMPLETED or FAILED, then review any returned alerts before promoting the v2 bot.

### Can I limit what my agent is allowed to do with the AWS Lex Models API?

Yes. Because you run Jentic One yourself, your own rules decide which Lex Model Building operations and which AWS credentials your agent may use. Lex puts the resource name in the URL path, such as /bots/{name}, /intents/{name}, and /slottypes/{name}, so you can pin the agent to a single bot and let it read and version only that bot. You also choose the exact operations it may call, so destructive ones like DeleteBot or DeleteIntent stay out unless you add them.
