Amazon Lex Runtime V2
amazonaws · Cloud
This section contains documentation for the Amazon Lex V2 Runtime V2 API operations.
Authentication
Sample Requests
Returns session information for a specified bot, alias, and user. For example, you can use this operation to retrieve session information for a user that has left a long-running session in use. If the bot, alias, or session identifier doesn't exist, Amazon Lex V2 returns a Bad
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}"import requests
response = requests.get(
"https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}';
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}"
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}";
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Creates a new session or modifies an existing session with an Amazon Lex V2 bot. Use this operation to enable your application to set the state of the bot.
Hover any highlighted part to learn what it does
curl -X POST "https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}"import requests
response = requests.post(
"https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}';
const response = await fetch(url, {
method: 'POST',
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}"
req, _ := http.NewRequest("POST", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}";
$opts = ["http" => [
"method" => "POST",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Sends user input to Amazon Lex V2. Client applications use this API to send requests to Amazon Lex V2 at runtime. Amazon Lex V2 then interprets the user input using the machine learning model that it build for the bot. In response, Amazon Lex V2 returns the next message to convey to the us
Hover any highlighted part to learn what it does
curl -X POST "https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text"import requests
response = requests.post(
"https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text",
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text';
const response = await fetch(url, {
method: 'POST',
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text"
req, _ := http.NewRequest("POST", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/amazonaws.com/runtime.lex.v2/2020-08-07/bots/{botId}/botAliases/{botAliasId}/botLocales/{localeId}/sessions/{sessionId}/text";
$opts = ["http" => [
"method" => "POST",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Amazon Lex Runtime V2?
Amazon Lex Runtime V2 is a Cloud API. Developers commonly use cloud APIs for:
- provisioning and managing cloud infrastructure
- automating deployments and container orchestration
- monitoring uptime and performance metrics
- managing storage buckets and databases
- setting up auto-scaling and load balancing
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Amazon Lex Runtime V2 is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide