GoodMemGoodMem

Ping

Endpoint health probes.

Methods on this page are called through client.ping.

client.ping.once

client.ping.once(request: PingOnceRequest, requestOptions?: RequestOptions): Promise<PingResultResponseShape>

Runs a single ping probe and returns the probe result.

HTTP: POST /v1/ping:once

Parameters

ParameterTypeDescription
requestPingOnceRequestRequest body.
requestOptionsRequestOptions optionalPer-call signal, timeout, or headers.

Returns: Promise&lt;PingResultResponseShape&gt;

Example

const ping = await client.ping.once({
  targetId: "your-embedder-id",
  targetTypeHint: "EMBEDDER",
  payloadType: "TEXT",
  payload: "hello",
});
console.log(ping.ok);

client.ping.stream

client.ping.stream(request: PingStreamParams, requestOptions?: RequestOptions): AsyncIterable<PingEventResponseShape>

Opens a streaming ping session and returns per-probe results plus a terminal summary.

HTTP: POST /v1/ping:stream

Parameters

ParameterTypeDescription
requestPingStreamParamsRequest body.
requestOptionsRequestOptions optionalPer-call signal, timeout, or headers.

Returns: AsyncIterable&lt;PingEventResponseShape&gt;

Example

for await (const event of client.ping.stream({
  targetId: "your-embedder-id",
  targetTypeHint: "EMBEDDER",
  count: 3,
  payloadType: "TEXT",
  payload: "hello",
})) {
  console.log(event.result?.ok);
}

Data Models

Enum Values

PingPayloadType

PAYLOAD_TYPE_UNSPECIFIED, TEXT, JSON, BINARY

PingTargetType

TARGET_TYPE_UNSPECIFIED, EMBEDDER, RERANKER, LLM

Interfaces

PingEndpointInfo

Resolved endpoint metadata for ping responses

FieldTypeRequiredDescription
targetTypePingTargetTypeyesResolved resource type
targetIdstringyesTarget resource ID (UUID)
resolvedEndpointstringyesFully resolved endpoint URL used for the probe
providerstringyesProvider name backing the resource
modelIdentifierstringyesProvider-specific model identifier

PingEvent

Streaming event from a ping session

FieldTypeRequiredDescription
resultPingResult | nullnoProbe result event
summaryPingSummary | nullnoSummary emitted at session completion
noticePingNotice | nullnoNon-fatal notice emitted during session

PingNotice

Non-fatal notice emitted during a ping session

FieldTypeRequiredDescription
codestringyesMachine-readable notice identifier
messagestringyesHuman-readable notice message
detailsRecord&lt;string, string&gt; | nullnoAdditional contextual details

PingOnceRequest

Request payload for a single ping probe

FieldTypeRequiredDescription
targetIdstringyesTarget resource ID (UUID)
targetTypeHintPingTargetType | nullnoOptional hint for the target resource type
payloadTypePingPayloadType | nullnoDesired payload type (defaults to provider-specific value)
payloadstring | nullnoExplicit UTF-8 payload to send with the probe (mutually exclusive with payloadSizeBytes)
payloadSizeBytesnumber | nullnoSynthetic payload size in bytes (mutually exclusive with payload)
timeoutMsnumber | nullnoPer-probe timeout in milliseconds (0 uses server default)

PingResult

Result from an individual ping probe

FieldTypeRequiredDescription
endpointPingEndpointInfoyesResolved endpoint metadata for the target
seqnumberyesSequential probe number (1-based)
bytesSentnumberyesPayload bytes transmitted
bytesReceivednumberyesPayload bytes received
okbooleanyesTrue when the provider responded successfully within the timeout
httpStatusnumberyesProvider HTTP status code or equivalent transport status
errorMessagestring | nullnoHuman-readable error message when ok=false
rttMsnumberyesObserved round-trip latency in milliseconds
timingPingTimingyesRaw timing data recorded on the server
metadataRecord&lt;string, string&gt; | nullnoAdditional provider metadata (request IDs, throttling signals, etc.)

PingStreamRequest

Request payload for a streaming ping session

FieldTypeRequiredDescription
targetIdstringyesTarget resource ID (UUID)
targetTypeHintPingTargetType | nullnoOptional hint for the target resource type
countnumber | nullnoNumber of probes to run (0 uses server default)
intervalMsnumber | nullnoDelay between probes in milliseconds (0 uses server default)
timeoutMsnumber | nullnoPer-probe timeout in milliseconds (0 uses server default)
payloadTypePingPayloadType | nullnoDesired payload type (defaults to provider-specific value)
payloadstring | nullnoExplicit UTF-8 payload to send with each probe (mutually exclusive with payloadSizeBytes)
payloadSizeBytesnumber | nullnoSynthetic payload size in bytes (mutually exclusive with payload)
maxInFlightnumber | nullnoMaximum concurrent probes (defaults to 1)
jitterboolean | nullnoAdd jitter to probe scheduling
labelsRecord&lt;string, string&gt; | nullnoOptional labels to attach to the ping session

PingSummary

Summary emitted at the end of a ping session

FieldTypeRequiredDescription
endpointPingEndpointInfoyesEndpoint metadata copied from the final probe
requestsnumberyesTotal number of probes scheduled
responsesnumberyesNumber of responses received (including timeouts/errors)
oknumberyesCount of probes that succeeded
timeoutsnumberyesCount of probes that exceeded the timeout
errorsnumberyesCount of probes that failed for other reasons
rttMinMsnumberyesMinimum observed round-trip latency (ms)
rttAvgMsnumberyesAverage observed round-trip latency (ms)
rttP50MsnumberyesMedian (p50) round-trip latency (ms)
rttP90Msnumberyes90th percentile round-trip latency (ms)
rttP99Msnumberyes99th percentile round-trip latency (ms)
rttMaxMsnumberyesMaximum observed round-trip latency (ms)
requestsPerSecondnumberyesEffective request throughput across the session
bytesPerSecondnumberyesAggregate bytes per second (send + receive)
appliedLimitsRecord&lt;string, string&gt; | nullnoResource limits applied by the server

PingTiming

Timing information captured during a ping probe

FieldTypeRequiredDescription
clientSendTimeUnixNanosnumberyesClient send time (Unix epoch nanoseconds)
serverReceivedTimeUnixNanosnumberyesServer received time (Unix epoch nanoseconds)
serverSendTimeUnixNanosnumberyesServer send time (Unix epoch nanoseconds)
clientReceiveTimeUnixNanosnumberyesClient receive time (Unix epoch nanoseconds)

Response Shapes

Response shape types model values returned by the SDK after forward-compatible unknown enum strings are coerced to null.

PingEndpointInfoResponseShape

FieldTypeRequiredDescription
targetTypePingTargetType | nullyesResolved resource type
targetIdstringyesTarget resource ID (UUID)
resolvedEndpointstringyesFully resolved endpoint URL used for the probe
providerstringyesProvider name backing the resource
modelIdentifierstringyesProvider-specific model identifier

PingEventResponseShape

Type constraint: PingEventResponseShape = RequireExactlyOne&lt;PingEventResponseShapeBase, "notice" \| "result" \| "summary"&gt;

FieldTypeRequiredDescription
resultPingResultResponseShape | nullnoProbe result event
summaryPingSummaryResponseShape | nullnoSummary emitted at session completion
noticePingNoticeResponseShape | nullnoNon-fatal notice emitted during session

PingNoticeResponseShape

FieldTypeRequiredDescription
codestringyesMachine-readable notice identifier
messagestringyesHuman-readable notice message
detailsRecord&lt;string, string&gt; | nullnoAdditional contextual details

PingResultResponseShape

FieldTypeRequiredDescription
endpointPingEndpointInfoResponseShapeyesResolved endpoint metadata for the target
seqnumberyesSequential probe number (1-based)
bytesSentnumberyesPayload bytes transmitted
bytesReceivednumberyesPayload bytes received
okbooleanyesTrue when the provider responded successfully within the timeout
httpStatusnumberyesProvider HTTP status code or equivalent transport status
errorMessagestring | nullnoHuman-readable error message when ok=false
rttMsnumberyesObserved round-trip latency in milliseconds
timingPingTimingResponseShapeyesRaw timing data recorded on the server
metadataRecord&lt;string, string&gt; | nullnoAdditional provider metadata (request IDs, throttling signals, etc.)

PingSummaryResponseShape

FieldTypeRequiredDescription
endpointPingEndpointInfoResponseShapeyesEndpoint metadata copied from the final probe
requestsnumberyesTotal number of probes scheduled
responsesnumberyesNumber of responses received (including timeouts/errors)
oknumberyesCount of probes that succeeded
timeoutsnumberyesCount of probes that exceeded the timeout
errorsnumberyesCount of probes that failed for other reasons
rttMinMsnumberyesMinimum observed round-trip latency (ms)
rttAvgMsnumberyesAverage observed round-trip latency (ms)
rttP50MsnumberyesMedian (p50) round-trip latency (ms)
rttP90Msnumberyes90th percentile round-trip latency (ms)
rttP99Msnumberyes99th percentile round-trip latency (ms)
rttMaxMsnumberyesMaximum observed round-trip latency (ms)
requestsPerSecondnumberyesEffective request throughput across the session
bytesPerSecondnumberyesAggregate bytes per second (send + receive)
appliedLimitsRecord&lt;string, string&gt; | nullnoResource limits applied by the server

PingTimingResponseShape

FieldTypeRequiredDescription
clientSendTimeUnixNanosnumberyesClient send time (Unix epoch nanoseconds)
serverReceivedTimeUnixNanosnumberyesServer received time (Unix epoch nanoseconds)
serverSendTimeUnixNanosnumberyesServer send time (Unix epoch nanoseconds)
clientReceiveTimeUnixNanosnumberyesClient receive time (Unix epoch nanoseconds)