> ## Documentation Index
> Fetch the complete documentation index at: https://docs.artaios.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Messages

Retrieve conversation history for a session.

<ParamField path="session_id" type="string" required>
  The session ID
</ParamField>

## Query Parameters

<ParamField query="limit" type="integer">
  Maximum number of messages to return (default: 50)
</ParamField>

<ParamField query="offset" type="integer">
  Number of messages to skip (default: 0)
</ParamField>

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.artaios.ai/api/v1/runtime/session_abc123/messages/?limit=10" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.artaios.ai/api/v1/runtime/session_abc123/messages/",
      headers={"x-api-key": "YOUR_API_KEY"},
      params={"limit": 10}
  )
  messages = response.json()
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.artaios.ai/api/v1/runtime/session_abc123/messages/?limit=10', {
    headers: {
      'x-api-key': 'YOUR_API_KEY'
    }
  });
  const messages = await response.json();
  ```
</CodeGroup>

## Response

Returns an array of message objects:

```json theme={null}
{
  "messages": [
    {
      "id": "msg_001",
      "role": "user",
      "content": "Hello, I need help with my account.",
      "timestamp": "2025-01-15T10:30:00Z"
    },
    {
      "id": "msg_002", 
      "role": "assistant",
      "content": "I'd be happy to help you with your account. What specific issue are you experiencing?",
      "timestamp": "2025-01-15T10:30:05Z"
    }
  ],
  "total": 2,
  "has_more": false
}
```
