Kallfi
API referenceResponses

Request a Soul response

POST
/v1/souls/{soul_id}/responses

Proposed operation. Requests one response on the explicit nsfw-disabled or nsfw-enabled surface from a bounded conversation context. The server owns safety, capability, provider, model, and execution-profile selection; this endpoint does not expose raw provider or model selection. The accepted operation retains the immutable surface; reusing an idempotency key or resource identity with a different surface returns 409 with error code surface_conflict.

Authorization

bearerAuth
AuthorizationBearer <token>

Organization-scoped bearer credential. Credentials are scoped, revocable, and never represented by a Soul or operation ID.

In: header

Path Parameters

soul_id*string

Company-scoped Kallfi Soul identifier.

Match^soul_[A-Za-z0-9][A-Za-z0-9._:-]{0,126}$
Length1 <= length <= 128

Header Parameters

Idempotency-Key*string

Opaque replay key for this mutation. Repeating the same key with the same request returns the original result; reusing it with different input returns a conflict.

Length1 <= length <= 128

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/souls/string/responses" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{    "surface": "nsfw-disabled",    "messages": [      {        "role": "user",        "content": "string"      }    ]  }'
{  "operation": {    "operation_id": "string",    "status": "accepted",    "resource": {      "type": "source_asset",      "id": "string"    },    "progress_percent": 0,    "quote": {      "quote_id": "string"    },    "usage": {      "reserved_gems": 0,      "consumed_gems": 0,      "released_gems": 0    },    "failure": {      "code": "string",      "message": "string",      "retryable": true    },    "output": {      "kind": "text",      "text": "string",      "media": [        {          "kind": "image",          "url": "http://example.com"        }      ]    },    "created_at": "2019-08-24T14:15:22Z",    "updated_at": "2019-08-24T14:15:22Z",    "links": {      "self": "http://example.com"    },    "kind": "source_asset_validation"  }}