Authentication
This API reference describes the RESTful API for interacting with the EXAONE API Platform. You can use the REST API over HTTPS from any environment that supports HTTPS requests.
The examples in this reference use cURL, and you need an API key to use the API.
Your use of the API is subject to the Terms of Service. If you exceed the usage policies, such as Rate Limits, you may not be able to use the service normally.
Authenticate with an API Key
Every request on the EXAONE API Platform must include your API key as a Bearer token in the Authorization header.
Keep your API key secret. Never share it or expose it in client-side code, such as in a browser or mobile app. In production, load your API key securely from an environment variable or a key management service, and route requests through your backend server.
Example
curl 'https://api.exaone.ai/v1/resource' \
-H "Authorization: Bearer $EXAONE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"param1": "value1",
"param2": "value2"
}'import requests
url = "https://api.exaone.ai/v1/resource"
headers = {
"Authorization": f"Bearer {EXAONE_API_KEY}",
"Content-Type": "application/json",
}
payload = {
"param1": "value1",
"param2": "value2",
}
response = requests.post(url=url, headers=headers, json=payload)
print(response.text)(async () => {
const url = 'https://api.exaone.ai/v1/resource';
const headers = {
Authorization: `Bearer ${EXAONE_API_KEY}`,
'Content-Type': 'application/json',
};
const payload = {
param1: 'value1',
param2: 'value2',
};
try {
const response = await fetch(url, {
method: 'POST',
headers: headers,
body: JSON.stringify(payload),
});
console.log(await response.json());
} catch (error) {
console.error('Error:', error);
}
})();