To access the Datura API, you must include your API key in the request header for authentication.

All API endpoints are authenticated using tokens.

Use the following format to add the authorization header to your API Requests:

'Authorization': '<your token>'

To access the Datura API, you must authenticate your requests using an API key which was generated as per here. This key grants secure access and ensures proper authorization for each API call. All API endpoints require authentication via tokens.

Authentication Method

Include your API key in the request header using the Authorization header. The correct format as below.

    curl --location 'https://apis.datura.ai/desearch/ai/search' \
    --header 'Authorization: dt_$UZA25rX0jLD654y7AGswWvqABCeJHFiCLqqBWPF6abc' \
    --header 'Content-Type: application/json' \
    --data '{
    "date_filter": "PAST_24_HOURS",
    "model": "NOVA",
    "prompt": "Latest TAO trends",
    "streaming": true,
    "tools": [
        "Twitter Search"
    ]
    }'

Important: Keep your API key confidential and do not expose it in client-side code.