Skip to main content

Response Metadata

Understand the token and result metadata returned on every MoltSets API response.

Updated this week

Every MoltSets response includes a _metadata object with token and usage information. The structure differs slightly between singular and batch requests.

Singular requests

The result object contains your tool's data alongside a _metadata field.

{
"jsonrpc": "2.0",
"id": null,
"result": {
"content": [
{
"type": "text",
"text": "{\"linkedin_slug\":\"john-smith-123\",\"_metadata\":{\"credits_charged\":1,\"credits_remaining\":225}}"
}
],
"isError": false
}
}

Field

Type

Description

credits_charged

integer

Tokens consumed by this request

credits_remaining

integer

Tokens remaining in your account after this request

Batch requests

Batch responses wrap results in a results array and promote metadata to a top-level metadata object with a full breakdown of the operation.

{
"jsonrpc": "2.0",
"id": null,
"result": {
"content": [
{
"type": "text",
"text": "{\"results\":[{\"input\":\"3018fe3a783fad1db0370ee3faaXXXXX\",\"data\":{\"linkedin_slug\":\"john-smith-123\"},\"status\":\"ok\"},{\"input\":\"3018fe3a783fad1db0370ee3faaXXXXX\",\"data\":{\"linkedin_slug\":\"john-smith-123\"},\"status\":\"ok\"}],\"metadata\":{\"total_requested\":2,\"total_processed\":2,\"total_with_data\":2,\"total_without_data\":0,\"total_errored\":0,\"credits_charged\":2,\"credits_remaining\":223}}"
}
],
"isError": false
}
}

Field

Type

Description

total_requested

integer

Number of items submitted in the batch

total_processed

integer

Number of items that were attempted

total_with_data

integer

Items that returned a result

total_without_data

integer

Items attempted but no match found

total_errored

integer

Items that failed due to an error

credits_charged

integer

Total tokens consumed by this batch

credits_remaining

integer

Tokens remaining in your account after this batch

Each item in results also includes a status field indicating the outcome for that specific input.

Status

Description

found

A match was returned in data

not_found

The input was valid but no match exists

error

The input could not be processed

Tokens are only charged for items where data is returned. `not_found` and `error` results do not consume tokens.

Did this answer your question?