---
title: "Import History"
method: POST
path: "/gateway/keys/{key_id}/imports"
tags: ["gateway"]
---

# Import History

`POST /gateway/keys/{key_id}/imports`

## Request

- Base URL: `https://api.os3robotics.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.os3robotics.com/gateway/keys/{key_id}/imports`
- Auth: HTTP bearer

Imports past traffic as traces of the key: the request body is JSON Lines, one
{"path", "request", "response"} exchange per line (chat completions by default, Responses or
Messages).

## Path parameters

- `key_id` string, uuid, required

## Query parameters

- `provider` union: An app key's import: the provider that answered it, `openai` or `anthropic` (that vendor's API on your app's own key) or one of your saved provider keys' id.
  - string, uuid
  - 'openai' | 'anthropic'

## Response `200`

Successful Response

- ImportResult
  - `import_id` string, uuid, required
  - `lines` integer
  - `imported` integer
  - `duplicates` integer
  - `refused` integer
  - `errors` LineError[]
    - `line` integer, required
    - `reason` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/os3robotics/apis/os3-api.md) - [All operations](https://skmtc.dev/os3robotics/apis/os3-api/llms.txt) - [OpenAPI document](https://skmtc.dev/os3robotics/apis/os3-api/revisions/af32cd4f14bb?raw)
