Skip to main content
GET
/
api
/
v1
/
llm
/
responses
Typescript (SDK)
import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await sdk.llm.responses.list({
    after: "resp_abc123",
    before: "resp_xyz789",
    limit: 25,
  });

  console.log(result);
}

run();
{
  "object": "list",
  "data": [
    {
      "id": "resp_abc123",
      "object": "response",
      "created_at": 1735689600,
      "status": "completed",
      "error": null,
      "incomplete_details": null,
      "background": false,
      "instructions": null,
      "max_output_tokens": null,
      "max_tool_calls": 30,
      "metadata": {
        "status": "reviewed",
        "reviewer": "john_doe"
      },
      "model": "meetkai:functionary-urdu-mini-pak",
      "output": [
        {
          "type": "message",
          "id": "msg_abc123",
          "role": "assistant",
          "content": [
            {
              "type": "output_text",
              "text": "The capital of France is Paris.",
              "annotations": []
            }
          ],
          "status": "completed"
        }
      ],
      "output_text": "The capital of France is Paris.",
      "parallel_tool_calls": true,
      "previous_response_id": null,
      "reasoning": {
        "effort": null,
        "summary": null
      },
      "service_tier": "auto",
      "store": true,
      "text": {
        "format": {
          "type": "text"
        },
        "verbosity": "medium"
      },
      "tool_choice": "auto",
      "tools": [],
      "truncation": "auto",
      "usage": {
        "input_tokens": 8,
        "input_tokens_details": {
          "cached_tokens": 0
        },
        "output_tokens": 7,
        "output_tokens_details": {
          "reasoning_tokens": 0
        },
        "total_tokens": 15
      },
      "user": null
    }
  ],
  "first_id": "resp_abc123",
  "last_id": "resp_abc123",
  "has_more": false
}

Authorizations

Authorization
string
header
required

Authenticate with your MKA1 API key at the API gateway: Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, also send X-On-Behalf-Of to identify the end user making the request.

Headers

X-On-Behalf-Of
string

Optional external user identifier for multi-user server-side integrations. Use this when acting on behalf of one of your end users.

Query Parameters

after
string

A response ID to use as a cursor for pagination. Returns responses that come after this ID in the list. Used for cursor-based pagination to fetch subsequent pages.

Example:

"resp_abc123"

before
string

A response ID to use as a cursor for pagination. Returns responses that come before this ID in the list. Used for cursor-based pagination to fetch previous pages.

Example:

"resp_xyz789"

limit
integer
default:20

The maximum number of responses to return per page. Must be between 1 and 100. Defaults to 20 items.

Required range: 1 <= x <= 100
Example:

25

order
enum<string>
default:desc

The order to return the responses in by creation date. 'asc' returns oldest responses first, 'desc' returns newest responses first. Defaults to 'desc' (newest first).

Available options:
asc,
desc
Example:

"desc"

Response

200 - application/json

Paginated list of responses for the authenticated user.

Paginated list object containing responses with cursor-based pagination metadata.

object
any
required

The object type, always 'list' for paginated list responses.

data
object[]
required

Array of response objects. Each response contains its status, model, input/output, tool usage logs, metadata, and completion information.

has_more
boolean
required

Indicates whether there are more responses available beyond the current page. True if additional pages exist, false otherwise.

first_id
string

The ID of the first response in the current page. Used as a reference point for pagination.

last_id
string

The ID of the last response in the current page. Used as a cursor for fetching the next page.