POST
/
contents
curl --request POST \
--url https://api.valyu.network/contents \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"urls": [
"https://example.com/article1",
"https://example.com/article2"
],
"response_length": "medium",
"summary": false
}'
{
"success": true,
"error": null,
"tx_id": "tx_12345678-1234-1234-1234-123456789abc",
"results": [
{
"title": "AI Breakthrough in Natural Language Processing",
"url": "https://example.com/article1?utm_source=valyu",
"content": "# AI Breakthrough in Natural Language Processing\n\nThis article discusses...",
"description": "Latest AI developments",
"source": "web",
"price": 0.002,
"length": 12840,
"data_type": "unstructured",
"source_type": "news_article",
"publication_date": "2024-01-15",
"id": "https://example.com/article1",
"image_url": {}
}
],
"urls_requested": 2,
"urls_processed": 2,
"urls_failed": 0,
"total_cost_dollars": 0.004,
"total_characters": 25680
}

Authorizations

x-api-key
string
header
required

Your Valyu API key. Get one at platform.valyu.network

Body

application/json

Response

200
application/json

All URLs processed successfully

The response is of type object.