> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3iq.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Queue a direct encrypted private-inference job.

B3IQ-native async API for encrypted private jobs against a known enrolled node. This is not hosted OpenAI chat. 

` POST /v1/api/private-inference/jobs `

Queue a direct encrypted private-inference job.

B3IQ-native async API for encrypted private jobs against a known
enrolled node. This is not hosted OpenAI chat.


## Servers

- ` https://b3iq.org ` — Public hosted gateway facade.

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` CustomerIDHeader `: ` apiKey `

  - Credential: ` X-B3IQ-Customer-ID ` in ` header `

- ` CustomerTokenHeader `: ` apiKey `

  - Credential: ` X-B3IQ-Customer-Token ` in ` header `

## Request body (required)

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` node_id `, ` model_id `, ` encrypted_request `

  - ` job_id `: type ` string `

  - ` node_id `: type ` string `

  - ` model_id `: type ` string `

  - ` webhook_url `: type ` string `; format ` uri ` — Optional HTTPS callback posted once the job reaches a terminal state.

  - ` encrypted_request `: type ` object `

    - Required fields: ` version `, ` key_id `, ` algorithm `, ` client_public_key_x25519 `, ` nonce `, ` ciphertext `

    - ` version `: type ` string `

      - enum: ` ["b3iq-private-transport-v1"] `

    - ` key_id `: type ` string `

    - ` algorithm `: type ` string `

      - enum: ` ["x25519-hkdf-sha256-chacha20poly1305"] `

    - ` client_public_key_x25519 `: type ` string ` — Base64url X25519 client public key.

    - ` nonce `: type ` string ` — Base64url 12-byte AEAD nonce.

    - ` ciphertext `: type ` string ` — Base64url encrypted payload.

    - ` aad_hash `: type ` string ` — Optional sha256 hash of the AAD used when sealing the envelope.

## Responses

### ` 202 ` — Job queued.

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` status `, ` job_id `, ` node_id `, ` command_id `, ` billing `, ` created_at `

  - ` status `: type ` string `

    - enum: ` ["queued"] `

  - ` job_id `: type ` string `

  - ` node_id `: type ` string `

  - ` command_id `: type ` string `

  - ` billing `: type ` null ` — Always null — private jobs on your own machines are free, so nothing is reserved.

  - ` webhook_url `: type ` string `; format ` uri ` — Present only when the create request supplied one.

  - ` created_at `: type ` string `; format ` date-time `

### ` default ` — B3IQ-native problem response.

Content type: ` application/json `

- ` value `: type ` object `

  - Required fields: ` error `

  - ` error `: type ` object `

    - Required fields: ` status `, ` title `, ` detail `

    - ` status `: type ` integer `

    - ` title `: type ` string `

    - ` detail `: type ` string `

    - ` code `: type ` string ` — Stable B3IQ code when present. See docs/error-codes.md.

## Request examples

### cURL

```curl
curl -X POST 'https://b3iq.org/v1/api/private-inference/jobs' \
  -H 'X-B3IQ-Customer-ID: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "job_id": "string",
  "node_id": "string",
  "model_id": "string",
  "webhook_url": "https://example.com",
  "encrypted_request": {
    "version": "b3iq-private-transport-v1",
    "key_id": "string",
    "algorithm": "x25519-hkdf-sha256-chacha20poly1305",
    "client_public_key_x25519": "string",
    "nonce": "string",
    "ciphertext": "string",
    "aad_hash": "string"
  }
}'
```

### JavaScript

```javascript
const response = await fetch('https://b3iq.org/v1/api/private-inference/jobs', {
  method: 'POST',
  headers: {
      "X-B3IQ-Customer-ID": "YOUR_API_KEY",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "job_id": "string",
    "node_id": "string",
    "model_id": "string",
    "webhook_url": "https://example.com",
    "encrypted_request": {
      "version": "b3iq-private-transport-v1",
      "key_id": "string",
      "algorithm": "x25519-hkdf-sha256-chacha20poly1305",
      "client_public_key_x25519": "string",
      "nonce": "string",
      "ciphertext": "string",
      "aad_hash": "string"
    }
  })
});

const data = await response.json();
console.log(data);
```