Give a descriptive name to identify the use of this API key.
Existing API Keys
Loading keys...
Loading your API keys...
No API key found. Create your first key using the form above.
{{ apiKey.title }}
KEY:{{ apiKey.key_preview }}
Created at:
{{ formatDate(apiKey.created_at) }}
How to Use the API Endpoint
Connect to this assistant's API using the endpoint below. Send your requests with a valid API key to interact programmatically.
All requests must include your API key in the Authorization header as a Bearer Token. Example: Authorization: Bearer YOUR_API_KEY
Example cURL Request
See below an example of how to send a request to the API using cURL. The field messages
messages is required and must contain at least one message with the user role.
The fields files, web_search, and think are optional
curl -X POST `{{apiEndpoint}}` \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [ // Required: List of messages
{
"role": "user",
"content": "Hello, how can I use this API?"
},
{
"role": "assistant",
"content": "You can use this API by sending messages like this!"
},
{
"role": "user",
"content": "I want to know more about AI."
}
],
"files": [ // Optional: List of files in base64
{
"name": "example.pdf",
"type": "application/pdf",
"content": "JVBERi0xL..."
}
],
"web_search": false, // Optional: Enable web search (true/false)
"think": false // Optional: Enable reasoning mode (true/false)
}'
Replace with your generated API key and customize the fields as needed.
Tips for Using the API:
Messages: Include at least one message with user. Message history (with assistant) is optional.
Files: Send files in base64 format, such as PDFs or documents, if needed.
Web Search: Set to true to enable web search, or omit/false to disable.
Think: true to enable reasoning mode, or omit/false for direct answers.
Keep your API key in a safe place and never share it publicly.