We use cookies to ensure you get the best experience on our website. Some of these cookies are provided by third parties. You are free to decide which categories you would like to permit and can withdraw this consent at any time (via cookie preferences link on the footer).
By accepting the necessary cookies, you agree to our privacy policy and terms of service, both located in the footer of the website.
Learn more on our terms of service and privacy policy.
‼️ (Deprecation warning) We recommend using the DeepNews endpoint for most applications, because it is capable of self-directed research into topics, automated follow up searches, and interacting with other tools like X (Twitter), Google, and Wikipedia. The Chat endpoint will be deprecated in the future. ‼️
The chat endpoint is an AI assistant infused with live news. You can ask it questions about the news, and it will respond with the latest information. You can also choose the model you'd like to use:
gpt-4.1-mini-2025-04-14 Fast response, but less intelligent (default, Fast tier).gpt-4.1-2025-04-14 Fast response, rich and intelligent (Rich tier).claude-sonnet-4-5-20250929 The latest Claude model (Rich tier).Wanna test it out or request a new model? You can come to our Discord server to talk directly to the bot, or ask us to integrate new models
The chat endpoint follows the OpenAI format for chat completions. The simplest way to use it is to use our pre-built SDK. The SDK will handle the authentication and response parsing for you. If you prefer to use the OpenAI SDK, you can use the same endpoint with the same parameters.
You can control many aspects of the output including:
filter_params for targeted news chatsYou can use the filter_params parameter to target your chat completions based on all the same filter parameters available in /news. This is useful if you want to ask questions about a specific article or set of articles, a specific source, a specific reporting voice, a specific graph, etc. The filter_params parameter is a dictionary that matches the parameters available in the /news endpoint.
Let's say you want to focus your chat on a specific subset of tech news:
If you want to automate the control of the filter_params, you can do so by calling our /autofilter endpoint, which allows you to describe your news filter in natural language, and returns a dictionary of parameters that can be passed directly to the filter_params parameter.
It is possible to use the OpenAI SDK to query the chat endpoint. The AskNews API uses OAuth 2.0 for authentication instead of API keys. In order to use the OpenAI SDK with the AskNews API you must first obtain an access token, then pass it in the Authorization header much like you would with an API key. Luckily, there are plenty of libraries that can help handle this for you. The OpenAI SDK uses httpx underneath the hood, and allows us to pass a custom client when using it. For the OAuth 2.0 handling, there is a great simple little package named httpx_auth that already implements the OAuth 2.0 handling for us. Below is an example of how to use the OpenAI SDK with these libraries to easily set this up:
You can also include the extra AskNews parameters in your OpenAI client (or langchain client) requests by adding them to the extra_body parameter.
Detailed and updated response structures are always available in the API reference