Sharing
Public read endpoints for a shared session, in both the page and JSON forms.
Send these requests to your own running server. Values stay in this browser.
How this works
Start a server with nikcli serve --hostname 127.0.0.1 --port 4096. Requests go
straight from this page to that address — the browser allows it because loopback counts as a
secure origin, and the server allows it because nikcli-ai.dev is in its CORS
allowlist.
To try things without touching your real sessions or config, start the server with
NIKCLI_TEST_HOME pointed at a throwaway directory — see
the guided tour.
Operations
4 endpoints, generated from the
server's own OpenAPI document. Every path also accepts the
directory and workspace query parameters that select which instance
handles the request.
| get | /s/{shareID} | getS:shareID |
| get | /share/{shareID} | getShare:shareID |
| get | /api/share/{shareID} | getApiShare:shareID |
| get | /api/share/{shareID}/data | getApiShare:shareIDData |
getS:shareID | Name | In | Type | Required |
|---|---|---|---|
| shareID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.getS:shareID({
...
}) Try it
getShare:shareID | Name | In | Type | Required |
|---|---|---|---|
| shareID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
( | { type: "session" data: Session_2 } | { type: "message" data: Message_1 } | { type: "part" data: Part_1 } | { type: "session_diff" data: FileDiff_2[] } | { type: "model" data: Model[] })[]
Example response from schema
[
{
"type": "session",
"data": {
"id": "",
"slug": "",
"projectID": "",
"directory": "",
"parentID": "",
"workspaceID": "",
"summary": {
"additions": null,
"deletions": null,
"files": null,
"diffs": null
},
"share": {
"url": null
},
"github": {
"owner": null,
"repo": null,
"fullName": null,
"baseBranch": null,
"headBranch": null,
"repositoryDirectory": null,
"cloneUrl": null,
"htmlUrl": null,
"private": null,
"worktree": null,
"pullRequest": null,
"lastCommitSha": null,
"publishedAt": null,
"publishError": null
},
"worktree": {
"name": null,
"branch": null,
"directory": null,
"repositoryDirectory": null,
"cleanedAt": null
},
"mobile": {
"platforms": null,
"primaryPlatform": null,
"method": null,
"detectedAt": null,
"buildStatus": null,
"lastBuildAt": null,
"artifacts": null
},
"title": "",
"activeCommand": "",
"version": "",
"time": {
"created": null,
"updated": null,
"compacting": null,
"archived": null
},
"permission": [],
"skills": [],
"disabledInstructions": [],
"disabledTools": {},
"revert": {
"messageID": null,
"partID": null,
"snapshot": null,
"diff": null
},
"lastModel": {
"providerID": null,
"modelID": null
}
}
}
] Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.getShare:shareID({
...
}) Try it
getApiShare:shareID | Name | In | Type | Required |
|---|---|---|---|
| shareID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
( | { type: "session" data: Session_2 } | { type: "message" data: Message_1 } | { type: "part" data: Part_1 } | { type: "session_diff" data: FileDiff_2[] } | { type: "model" data: Model[] })[]
Example response from schema
[
{
"type": "session",
"data": {
"id": "",
"slug": "",
"projectID": "",
"directory": "",
"parentID": "",
"workspaceID": "",
"summary": {
"additions": null,
"deletions": null,
"files": null,
"diffs": null
},
"share": {
"url": null
},
"github": {
"owner": null,
"repo": null,
"fullName": null,
"baseBranch": null,
"headBranch": null,
"repositoryDirectory": null,
"cloneUrl": null,
"htmlUrl": null,
"private": null,
"worktree": null,
"pullRequest": null,
"lastCommitSha": null,
"publishedAt": null,
"publishError": null
},
"worktree": {
"name": null,
"branch": null,
"directory": null,
"repositoryDirectory": null,
"cleanedAt": null
},
"mobile": {
"platforms": null,
"primaryPlatform": null,
"method": null,
"detectedAt": null,
"buildStatus": null,
"lastBuildAt": null,
"artifacts": null
},
"title": "",
"activeCommand": "",
"version": "",
"time": {
"created": null,
"updated": null,
"compacting": null,
"archived": null
},
"permission": [],
"skills": [],
"disabledInstructions": [],
"disabledTools": {},
"revert": {
"messageID": null,
"partID": null,
"snapshot": null,
"diff": null
},
"lastModel": {
"providerID": null,
"modelID": null
}
}
}
] Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.getApiShare:shareID({
...
}) Try it
getApiShare:shareIDData | Name | In | Type | Required |
|---|---|---|---|
| shareID | path | string | required |
| directory | query | string | optional |
| workspace | query | string | optional |
( | { type: "session" data: Session_2 } | { type: "message" data: Message_1 } | { type: "part" data: Part_1 } | { type: "session_diff" data: FileDiff_2[] } | { type: "model" data: Model[] })[]
Example response from schema
[
{
"type": "session",
"data": {
"id": "",
"slug": "",
"projectID": "",
"directory": "",
"parentID": "",
"workspaceID": "",
"summary": {
"additions": null,
"deletions": null,
"files": null,
"diffs": null
},
"share": {
"url": null
},
"github": {
"owner": null,
"repo": null,
"fullName": null,
"baseBranch": null,
"headBranch": null,
"repositoryDirectory": null,
"cloneUrl": null,
"htmlUrl": null,
"private": null,
"worktree": null,
"pullRequest": null,
"lastCommitSha": null,
"publishedAt": null,
"publishError": null
},
"worktree": {
"name": null,
"branch": null,
"directory": null,
"repositoryDirectory": null,
"cleanedAt": null
},
"mobile": {
"platforms": null,
"primaryPlatform": null,
"method": null,
"detectedAt": null,
"buildStatus": null,
"lastBuildAt": null,
"artifacts": null
},
"title": "",
"activeCommand": "",
"version": "",
"time": {
"created": null,
"updated": null,
"compacting": null,
"archived": null
},
"permission": [],
"skills": [],
"disabledInstructions": [],
"disabledTools": {},
"revert": {
"messageID": null,
"partID": null,
"snapshot": null,
"diff": null
},
"lastModel": {
"providerID": null,
"modelID": null
}
}
}
] Generated from the response schema — field values are placeholders, the shape is real.
SDK example
import { createNikcliClient } from "@nikcli-ai/sdk/httpapi"
const client = createNikcliClient()
await client.getApiShare:shareIDData({
...
}) Try it
Schemas
The 49 schemas reachable from these endpoints. Each is shown one level
deep; nested types link to their own entry below.
Names ending in _2, _3 and so on are the OpenAPI emitter
disambiguating same-named schemas declared by different HttpApi groups — they are distinct
shapes, not duplicates.
{ id: string sessionID: string messageID: string type: "agent" name: string source?: { value: string start: number end: number } }
{ name: "APIError" data: { message: string statusCode?: | number | "Infinity" | "-Infinity" | "NaN" isRetryable: boolean responseHeaders?: { [key: string]: string } responseBody?: string metadata?: { [key: string]: string } classification?: "payload-too-large" } }
{ id: string sessionID: string role: "assistant" time: { created: | number | "Infinity" | "-Infinity" | "NaN" completed?: | number | "Infinity" | "-Infinity" | "NaN" } error?: | ProviderAuthError_1 | UnknownError_1 | MessageOutputLengthError_1 | MessageContextOverflowError_1 | MessageAbortedError_1 | StructuredOutputError_1 | APIError_2 parentID: string modelID: string providerID: string mode: string agent: string path: { cwd: string root: string } summary?: boolean cost: | number | "Infinity" | "-Infinity" | "NaN" tokens: { total?: | number | "Infinity" | "-Infinity" | "NaN" input: | number | "Infinity" | "-Infinity" | "NaN" output: | number | "Infinity" | "-Infinity" | "NaN" reasoning: | number | "Infinity" | "-Infinity" | "NaN" cache: { read: | number | "Infinity" | "-Infinity" | "NaN" write: | number | "Infinity" | "-Infinity" | "NaN" } } structured?: unknown finish?: string }
{ id: string sessionID: string messageID: string type: "compaction" auto: boolean }
{ file: string patch: string additions: | number | "Infinity" | "-Infinity" | "NaN" deletions: | number | "Infinity" | "-Infinity" | "NaN" status?: | "added" | "deleted" | "modified" | null before: string after: string }
{ id: string sessionID: string messageID: string type: "file" mime: string filename?: string url: string source?: FilePartSource_2 }
FileSource_2 | SymbolSource_2 | ResourceSource_2
{ value: string start: number end: number }
{ text: FilePartSourceText_6 type: "file" path: string }
{ [key: string]: unknown }
UserMessage_1 | AssistantMessage_1
{ name: "MessageAbortedError" data: { message: string } }
{ name: "MessageContextOverflowError" data: { message: string statusCode?: | number | "Infinity" | "-Infinity" | "NaN" responseBody?: string } }
{ name: "MessageOutputLengthError" data: { [key: string]: unknown } | unknown[] }
{ id: string providerID: string api: { id: string url?: string npm: string } name: string family?: string capabilities: { temperature: boolean reasoning: boolean attachment: boolean toolcall: boolean input: { text: boolean audio: boolean image: boolean video: boolean pdf: boolean } output: { text: boolean audio: boolean image: boolean video: boolean pdf: boolean } interleaved: | boolean | { field: "reasoning_content" | "reasoning_details" } } cost: { input: | number | "Infinity" | "-Infinity" | "NaN" output: | number | "Infinity" | "-Infinity" | "NaN" cache: { read: | number | "Infinity" | "-Infinity" | "NaN" write: | number | "Infinity" | "-Infinity" | "NaN" } experimentalOver200K?: { input: | number | "Infinity" | "-Infinity" | "NaN" output: | number | "Infinity" | "-Infinity" | "NaN" cache: { read: | number | "Infinity" | "-Infinity" | "NaN" write: | number | "Infinity" | "-Infinity" | "NaN" } } } limit: { context: | number | "Infinity" | "-Infinity" | "NaN" input?: | number | "Infinity" | "-Infinity" | "NaN" output: | number | "Infinity" | "-Infinity" | "NaN" } status: | "alpha" | "beta" | "deprecated" | "active" options: { [key: string]: unknown } headers: { [key: string]: string } release_date: string variants?: { [key: string]: { [key: string]: unknown } } }
OutputFormatText_1 | OutputFormatJsonSchema_1
{ type: "json_schema" schema: JSONSchema_1 retryCount: number }
{ type: "text" }
| TextPart_1 | SubtaskPart_1 | ReasoningPart_1 | FilePart_2 | ToolPart_1 | StepStartPart_1 | StepFinishPart_1 | SnapshotPart_1 | PatchPart_1 | AgentPart_1 | RetryPart_1 | CompactionPart_1
{ id: string sessionID: string messageID: string type: "patch" hash: string files: string[] }
"allow" | "deny" | "ask"
{ permission: string pattern: string action: PermissionAction_3 }
PermissionRule_3[]
{ name: "ProviderAuthError" data: { providerID: string message: string } }
{ start: { line: | number | "Infinity" | "-Infinity" | "NaN" character: | number | "Infinity" | "-Infinity" | "NaN" } end: { line: | number | "Infinity" | "-Infinity" | "NaN" character: | number | "Infinity" | "-Infinity" | "NaN" } }
{ id: string sessionID: string messageID: string type: "reasoning" text: string metadata?: { [key: string]: unknown } time: { start: | number | "Infinity" | "-Infinity" | "NaN" end?: | number | "Infinity" | "-Infinity" | "NaN" } }
{ text: FilePartSourceText_6 type: "resource" clientName: string uri: string }
{ id: string sessionID: string messageID: string type: "retry" attempt: | number | "Infinity" | "-Infinity" | "NaN" error: APIError_2 time: { created: | number | "Infinity" | "-Infinity" | "NaN" } }
{ id: string slug: string projectID: string directory: string parentID?: string workspaceID?: string summary?: { additions: | number | "Infinity" | "-Infinity" | "NaN" deletions: | number | "Infinity" | "-Infinity" | "NaN" files: | number | "Infinity" | "-Infinity" | "NaN" diffs?: FileDiff_2[] } share?: { url: string } github?: SessionGithub_3 worktree?: SessionWorktree_6 mobile?: SessionMobile_2 title: string activeCommand?: string version: string time: { created: | number | "Infinity" | "-Infinity" | "NaN" updated: | number | "Infinity" | "-Infinity" | "NaN" compacting?: | number | "Infinity" | "-Infinity" | "NaN" archived?: | number | "Infinity" | "-Infinity" | "NaN" } permission?: PermissionRuleset_3 skills?: string[] disabledInstructions?: string[] disabledTools?: { [key: string]: boolean } revert?: { messageID: string partID?: string snapshot?: string diff?: string } lastModel?: { providerID: string modelID: string } }
{ owner: string repo: string fullName: string baseBranch: string headBranch: string repositoryDirectory?: string cloneUrl?: string htmlUrl?: string private?: boolean worktree: SessionWorktree_5 pullRequest?: { number: | number | "Infinity" | "-Infinity" | "NaN" url: string title: string } lastCommitSha?: string publishedAt?: | number | "Infinity" | "-Infinity" | "NaN" publishError?: string }
{ platforms: ( | "ios" | "android" | "expo" | "flutter" | "react-native")[] primaryPlatform: string method: string detectedAt: | number | "Infinity" | "-Infinity" | "NaN" buildStatus?: | "unknown" | "building" | "succeeded" | "failed" lastBuildAt?: | number | "Infinity" | "-Infinity" | "NaN" artifacts?: ({ platform: string path: string size?: | number | "Infinity" | "-Infinity" | "NaN" createdAt?: | number | "Infinity" | "-Infinity" | "NaN" })[] }
{ name: string branch: string directory: string repositoryDirectory?: string cleanedAt?: | number | "Infinity" | "-Infinity" | "NaN" }
{ name: string branch: string directory: string repositoryDirectory?: string cleanedAt?: | number | "Infinity" | "-Infinity" | "NaN" }
{ id: string sessionID: string messageID: string type: "snapshot" snapshot: string }
{ id: string sessionID: string messageID: string type: "step-finish" reason: string snapshot?: string cost: | number | "Infinity" | "-Infinity" | "NaN" tokens: { total?: | number | "Infinity" | "-Infinity" | "NaN" input: | number | "Infinity" | "-Infinity" | "NaN" output: | number | "Infinity" | "-Infinity" | "NaN" reasoning: | number | "Infinity" | "-Infinity" | "NaN" cache: { read: | number | "Infinity" | "-Infinity" | "NaN" write: | number | "Infinity" | "-Infinity" | "NaN" } } }
{ id: string sessionID: string messageID: string type: "step-start" snapshot?: string }
{ name: "StructuredOutputError" data: { message: string retries: | number | "Infinity" | "-Infinity" | "NaN" } }
{ id: string sessionID: string messageID: string type: "subtask" prompt: string description: string agent: string model?: { providerID: string modelID: string } command?: string background?: boolean }
{ text: FilePartSourceText_6 type: "symbol" path: string range: Range_2 name: string kind: number }
{ id: string sessionID: string messageID: string type: "text" text: string synthetic?: boolean ignored?: boolean time?: { start: | number | "Infinity" | "-Infinity" | "NaN" end?: | number | "Infinity" | "-Infinity" | "NaN" } metadata?: { [key: string]: unknown } }
{ id: string sessionID: string messageID: string type: "tool" callID: string tool: string state: ToolState_1 metadata?: { [key: string]: unknown } }
| ToolStatePending_1 | ToolStateRunning_1 | ToolStateCompleted_1 | ToolStateError_1
{ status: "completed" input: { [key: string]: unknown } output: string title: string metadata: { [key: string]: unknown } time: { start: | number | "Infinity" | "-Infinity" | "NaN" end: | number | "Infinity" | "-Infinity" | "NaN" compacted?: | number | "Infinity" | "-Infinity" | "NaN" } attachments?: FilePart_2[] }
{ status: "error" input: { [key: string]: unknown } error: string metadata?: { [key: string]: unknown } time: { start: | number | "Infinity" | "-Infinity" | "NaN" end: | number | "Infinity" | "-Infinity" | "NaN" } }
{ status: "pending" input: { [key: string]: unknown } raw: string }
{ status: "running" input: { [key: string]: unknown } title?: string metadata?: { [key: string]: unknown } structured?: { [key: string]: unknown } content?: ( | { type: "text" text: string } | { type: "file" data: string mime: string name?: string })[] time: { start: | number | "Infinity" | "-Infinity" | "NaN" } }
{ name: "UnknownError" data: { message: string } }
{ id: string sessionID: string role: "user" time: { created: | number | "Infinity" | "-Infinity" | "NaN" } format?: OutputFormat_1 summary?: { title?: string body?: string diffs: FileDiff_2[] } agent: string model: { providerID: string modelID: string } system?: string tools?: { [key: string]: boolean } variant?: string }