Get up and running with our API in minutes. Follow this guide to create your account, generate an API key, and make your first ** request.**

Step 1
Create Account

Sign up in seconds to access your personal dashboard and start building.

Step 2
Choose Your Plan
Select the subscription tier that fits your needs. Change anytime.
Step 3
Generate API Key

Create secure keys to authenticate your API requests instantly.

Here's a complete example showing how to execute a message request. Replace <YOUR_API_KEY> with your actual API key.

Execute Message Endpoint

POST request to /api/v1/jobs/messages

bash
curl -X POST "https://api.tokenthon.com/api/v1/jobs/messages" \
    -H "Content-Type: application/json" \
    -H "x-api-key: <YOUR_API_KEY>" \
    -d '{
        "model": "gpt-auto",
        "messages": [{
        "role": "user",
        "content": "Write a one-sentence bedtime story about a unicorn."
        }],
        "response_format": { "format": "text" },
        "message_cache_ttl": 300,
        "timeout": 90
    }'

Request Parameters Explained

model

The AI model to use. gpt-auto automatically selects the best model.

messagesArray of conversation messages with role and content.
message_cache_ttlCache duration in seconds (default: 300).
timeoutMaximum execution time in seconds (default: 90).

When you make a request to the API, you'll receive a JSON response with the following structure:

Example Response

Typical JSON response from the execute endpoint

json
{
    "success": true,
    "data": {
        "job_id": "c07748a4-7545-4d8d-8c9f-cc759a965d39",
        "status": "completed",
        "created_at": 1760814494529,
        "result": {
            "response_message": "Under a blanket of twinkling stars, a gentle unicorn named Luma painted the night sky with shimmering dreams so every child could fall asleep smiling."
        }
    },
    "message": "Job result retrieved successfully"
}

Ready to build something amazing?

Explore our full API documentation to unlock advanced features.

View API Reference