# Authentication
Source: https://docs.chatcsv.co/api-reference/authentication
Authenticating your requests
The ChatCSV API uses API keys to authenticate requests. You can view and manage your API keys by:
1. Heading to ChatCSV Dashboard
2. Click your account name in the top left
3. Click on API and then create API key
```bash theme={null}
'Authorization': 'Bearer '
```
# Create Chat Completion
Source: https://docs.chatcsv.co/api-reference/endpoint/create
POST http://localhost:3000/api/v1/chat
Given a list of messages comprising a conversation, the model will return a response.
### Body
The model used to generate the response.
`gpt-4o-mini`. Default is `gpt-4o-mini`.
A list of messages
The role of the messages author. One of `assistant` or `user`
The contents of the message. `content` is required for all messages, and may
be null for assistant messages with function calls.
A list of file URLs to ask questions. All URLs must be publicly accessible. We currently support `csv`, `json`, `xlsx`, `txt`, `html`, `xml`, `parquet`, `dta`, `sas`, `sav`.
If you want a file supporting, get in touch at [sam@chatcsv.co](mailto:sam@chatcsv.co)
A list of file urls.
Example: `["https://data.set/titanic.csv"]`
### Response
Response will be sent as [data-only server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#event_stream_format) as they become available.
Example: `Hey, how can I help?`
```bash Example Request theme={null}
curl --no-buffer \
-X POST \
-H 'accept: text/event-stream' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ' \
-d '{
"model": "gpt-4o-mini",
"messages": [
{
"role": "user",
"content": "whats your name"
},
{
"role": "assistant",
"content": "bob"
},
{
"role": "user",
"content": "show me some interesting visuals about this data. but start with what q i asked first"
}
],
"files": [
"https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv"
]
}' \
'https://www.chatcsv.co/api/v1/chat'
```
```json Response theme={null}
How may I help you today?
```
# Introduction
Source: https://docs.chatcsv.co/introduction
Welcome to the ChatCSV docs
## What is ChatCSV?
ChatCSV is like having a team of Data Scientists right in your pocket.
Upload any spreadsheet and get bar charts, line charts, histograms, scatter plots and more.
## Ready to get started?
Create an API key to start using our API.
Use our chat completions API to build your own integrations.
Visit an example of this API in action. Built with nextjs app dir.
View the Postman Collection to create a chat completion
View an example of the ChatCSV API with express on replit