Emphasize - let the model pick which words to bold (experimental)
curl --request POST \
--url https://api.acaas.example.com/v1/emphasize \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"text": "hello world",
"emphasis_ratio": 0.3
}
'import requests
url = "https://api.acaas.example.com/v1/emphasize"
payload = {
"text": "hello world",
"emphasis_ratio": 0.3
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: 'hello world', emphasis_ratio: 0.3})
};
fetch('https://api.acaas.example.com/v1/emphasize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.acaas.example.com/v1/emphasize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => 'hello world',
'emphasis_ratio' => 0.3
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.acaas.example.com/v1/emphasize"
payload := strings.NewReader("{\n \"text\": \"hello world\",\n \"emphasis_ratio\": 0.3\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.acaas.example.com/v1/emphasize")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"hello world\",\n \"emphasis_ratio\": 0.3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.acaas.example.com/v1/emphasize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"hello world\",\n \"emphasis_ratio\": 0.3\n}"
response = http.request(request)
puts response.read_body{
"original": "<string>",
"result": "<string>",
"emphasized_words": [
"<string>"
],
"model": "<string>",
"experimental": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Capitalize
Emphasize (experimental)
Ask the experimental emphasis model.
Chosen words are wrapped in markdown bold (**word**). Behavior is non-deterministic and may change between versions.
POST
/
v1
/
emphasize
Emphasize - let the model pick which words to bold (experimental)
curl --request POST \
--url https://api.acaas.example.com/v1/emphasize \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"text": "hello world",
"emphasis_ratio": 0.3
}
'import requests
url = "https://api.acaas.example.com/v1/emphasize"
payload = {
"text": "hello world",
"emphasis_ratio": 0.3
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({text: 'hello world', emphasis_ratio: 0.3})
};
fetch('https://api.acaas.example.com/v1/emphasize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.acaas.example.com/v1/emphasize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'text' => 'hello world',
'emphasis_ratio' => 0.3
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.acaas.example.com/v1/emphasize"
payload := strings.NewReader("{\n \"text\": \"hello world\",\n \"emphasis_ratio\": 0.3\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.acaas.example.com/v1/emphasize")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"hello world\",\n \"emphasis_ratio\": 0.3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.acaas.example.com/v1/emphasize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"hello world\",\n \"emphasis_ratio\": 0.3\n}"
response = http.request(request)
puts response.read_body{
"original": "<string>",
"result": "<string>",
"emphasized_words": [
"<string>"
],
"model": "<string>",
"experimental": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
application/json
Input to /v1/emphasize - the experimental AI emphasis endpoint.
The meek, lowercase text you want made louder.
Minimum string length:
1Example:
"hello world"
Fraction of words to emphasize, from just above 0 up to 1.0.
Required range:
x <= 1Response
Successful Response
Response envelope for /v1/emphasize.
The text you sent in.
Text with emphasized words wrapped in markdown bold.
The words the model chose to emphasize.
Name and version of the emphasis model.
Always true - this endpoint's behavior may change.
Was this page helpful?