> This page is for version 0.10.
> For other versions, use one of these documentation indexes:
> - Latest (default): https://docs.nvidia.com/nemo-helix/latest/llms.txt
> - 0.10: https://docs.nvidia.com/nemo-helix/v0.10/llms.txt
> - 0.9: https://docs.nvidia.com/nemo-helix/v0.9/llms.txt
> - 0.8: https://docs.nvidia.com/nemo-helix/v0.8/llms.txt
> - 0.7: https://docs.nvidia.com/nemo-helix/v0.7/llms.txt
> - 0.6: https://docs.nvidia.com/nemo-helix/v0.6/llms.txt
> - 0.5: https://docs.nvidia.com/nemo-helix/v0.5/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo-helix/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo-helix/_mcp/server.

# Ingest Chat Completion

POST http://localhost:8080/apis/intake/v2/workspaces/{workspace}/ingest/chat-completions
Content-Type: application/json

Reference: https://docs.nvidia.com/nemo-helix/documentation/reference/api-reference/ingest/chat-completion-apis-intake-v-2-workspaces-workspace-ingest-chat-completions-post

## Request

### Path parameters

- `workspace` (string, required)

### Body (application/json)

This endpoint expects a ChatCompletionsIngestRequest.

- `request` (CapturedChatCompletionsRequest, required) — Flexible captured chat-completions request.
- `response` (CapturedChatCompletionsResponse, required) — Flexible captured chat-completions response.
- `evaluation_context` (EvaluationContext, optional) — Identifies the Evaluation and optional test case associated with ingested telemetry.
- `session_id` (string, optional) — Groups related chat-completions calls without forcing them into the same trace.
- `trace_id` (string, optional) — Opt into joining an existing trace built via OTel or ATIF. This is not a grouping mechanism for chat-completions calls; use session_id to group related calls.
- `provider` (string, optional)
- `cost_usd` (double, optional) — Total estimated cost of this model call in USD. This matches ATIF step metrics; Intake stores it as semantic cost_total_usd on spans.
- `cost_input_usd` (double, optional) — Estimated input-token cost of this model call in USD.
- `cost_output_usd` (double, optional) — Estimated output-token cost of this model call in USD.
- `cost_details` (map from string to double, optional) — Additional estimated cost breakdown fields in USD.

## Response

### 201

Successful Response

- `session_id` (string, required)
- `span_id` (string, required)

## Errors

### 422 Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

## Types

### CapturedChatCompletionsRequest

Flexible captured chat-completions request.

- `messages` (list of CapturedChatMessage, required) — Messages comprising the conversation.
- `model` (string, required) — The model identifier used for this request.

### CapturedChatCompletionsResponse

Flexible captured chat-completions response.

- `choices` (list of map from string to any, optional)
- `error` (map from string to any, optional)

### EvaluationContext

Identifies the Evaluation and optional test case associated with ingested telemetry.

- `evaluation_name` (string, optional) — Name of an existing Evaluation.
- `test_case_name` (string, optional) — Optional producer-supplied test case name.
- `evaluation_id` (string, optional, deprecated) — Deprecated alias for evaluation_name. Use evaluation_name instead.
- `test_case_id` (string, optional, deprecated) — Deprecated alias for test_case_name. Use test_case_name instead.

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)
- `input` (any, optional)
- `ctx` (map from string to any, optional)

### CapturedChatMessage

A flexible message model that requires a valid role field but allows provider-specific fields.

- `role` (enum, required) — The role of the message sender.
  - Allowed values: `user`, `system`, `assistant`, `developer`, `tool`, `function`

### ValidationErrorLocItems

- string
- integer

## Examples

**Request**

```json
{
  "request": {
    "messages": [
      {
        "role": "user"
      }
    ],
    "model": "string"
  },
  "response": {
    "error": {}
  }
}
```

**Response**

```json
{
  "session_id": "string",
  "span_id": "string"
}
```

**SDK Code**

```python
import requests

url = "http://localhost:8080/apis/intake/v2/workspaces/workspace/ingest/chat-completions"

payload = {
    "request": {
        "messages": [{ "role": "user" }],
        "model": "string"
    },
    "response": { "error": {} }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'http://localhost:8080/apis/intake/v2/workspaces/workspace/ingest/chat-completions';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"request":{"messages":[{"role":"user"}],"model":"string"},"response":{"error":{}}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```