# dev.cocore.inference.submit

> Published by [cocore.dev](https://lexicon.garden/identity/did:plc:5quuhkmwe2q4k3azfsgg7kdz)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:5quuhkmwe2q4k3azfsgg7kdz/dev.cocore.inference.submit)
- [Documentation](https://lexicon.garden/lexicon/did:plc:5quuhkmwe2q4k3azfsgg7kdz/dev.cocore.inference.submit/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:5quuhkmwe2q4k3azfsgg7kdz/dev.cocore.inference.submit/examples)

## Definitions

### `dev.cocore.inference.submit`

**Type**: `procedure`

Submit an inference request for the authenticated requester. Builds a (paymentAuthorization, job) pair scoped to the configured exchange, publishes both to the requester's PDS, and returns the job/authorization URIs so the caller can poll for a receipt via `dev.cocore.inference.status`.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `model` | `string` | Yes | Opaque model identifier honored by the provider. |
| `prompt` | `string` | Yes |  |
| `maxTokensOut` | `integer` | Yes |  |
| `priceCeiling` | `object` | Yes | Maximum the requester will pay. Integer minor units plus an ISO 4217 / XBT-style currency code. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `jobUri` | `string` (at-uri) | Yes |  |
| `authUri` | `string` (at-uri) | Yes |  |
| `inputCommitment` | `string` | Yes | SHA-256 (lowercase hex) over the input bytes. |

#### Errors

- **AuthRequired**: The caller is not authenticated.
- **InvalidRequest**: The body failed validation.

## Raw Schema

```json
{
  "id": "dev.cocore.inference.submit",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "model",
            "prompt",
            "maxTokensOut",
            "priceCeiling"
          ],
          "properties": {
            "model": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque model identifier honored by the provider."
            },
            "prompt": {
              "type": "string",
              "minLength": 1
            },
            "maxTokensOut": {
              "type": "integer",
              "minimum": 1
            },
            "priceCeiling": {
              "type": "object",
              "required": [
                "amount",
                "currency"
              ],
              "properties": {
                "amount": {
                  "type": "integer",
                  "minimum": 0
                },
                "currency": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "description": "Maximum the requester will pay. Integer minor units plus an ISO 4217 / XBT-style currency code."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthRequired",
          "description": "The caller is not authenticated."
        },
        {
          "name": "InvalidRequest",
          "description": "The body failed validation."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "jobUri",
            "authUri",
            "inputCommitment"
          ],
          "properties": {
            "jobUri": {
              "type": "string",
              "format": "at-uri"
            },
            "authUri": {
              "type": "string",
              "format": "at-uri"
            },
            "inputCommitment": {
              "type": "string",
              "description": "SHA-256 (lowercase hex) over the input bytes."
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Submit an inference request for the authenticated requester. Builds a (paymentAuthorization, job) pair scoped to the configured exchange, publishes both to the requester's PDS, and returns the job/authorization URIs so the caller can poll for a receipt via `dev.cocore.inference.status`."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
