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

# Deeplineagent Ai Inference: Inputs, Cost & CLI Example

> Plain AI Gateway inference with no Deepline-managed search, bash, or agent tool access. Includes inputs, outputs, costs, and Deepline CLI examples.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=deeplineagent_ai_inference:{}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                      | Type                   | Required | Default                 | Description                                                                                                                                                                                                                           |
| ------------------------- | ---------------------- | -------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.prompt`          | `string`               | No       |                         |                                                                                                                                                                                                                                       |
| `payload.messages`        | `array`                | No       |                         |                                                                                                                                                                                                                                       |
| `payload.model`           | `string`               | No       | `"openai/gpt-5.6-luna"` | Provider-prefixed Vercel AI Gateway language model id, for example "openai/gpt-5.6-luna", "openai/gpt-5.6-sol", "openai/gpt-5.6-terra", or "anthropic/claude-opus-5". The live AI Gateway catalog is authoritative at execution time. |
| `payload.system`          | `string`               | No       |                         | Optional system prompt.                                                                                                                                                                                                               |
| `payload.jsonSchema`      | `string \| unknown`    | No       |                         | Optional JSON Schema for structured output.                                                                                                                                                                                           |
| `payload.providerOptions` | `record`               | No       |                         | AI SDK providerOptions passthrough, namespaced by provider. Examples: \{"gateway":\{"serviceTier":"priority"},"openai":\{"reasoningEffort":"low"}}.                                                                                   |
| `payload.serviceTier`     | `"flex" \| "priority"` | No       |                         | Convenience alias for providerOptions.gateway.serviceTier when no explicit gateway serviceTier is provided.                                                                                                                           |
| `payload.maxOutputTokens` | `integer`              | No       |                         | Maximum output tokens for each model call. For reasoning models this budget includes reasoning and response tokens, so structured output needs enough headroom to complete.                                                           |

### Allowed values

| Field                 | Allowed values     |
| --------------------- | ------------------ |
| `payload.serviceTier` | `flex`, `priority` |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "",
    "properties": {
      "prompt": {
        "type": "string"
      },
      "messages": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "role": {
              "type": "string",
              "enum": [
                "system",
                "user",
                "assistant"
              ]
            },
            "content": {
              "type": "string"
            }
          },
          "required": [
            "role",
            "content"
          ],
          "additionalProperties": false
        }
      },
      "model": {
        "type": "string",
        "description": "Provider-prefixed Vercel AI Gateway language model id, for example \"openai/gpt-5.6-luna\", \"openai/gpt-5.6-sol\", \"openai/gpt-5.6-terra\", or \"anthropic/claude-opus-5\". The live AI Gateway catalog is authoritative at execution time.",
        "default": "openai/gpt-5.6-luna",
        "pattern": "^[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$"
      },
      "system": {
        "type": "string",
        "description": "Optional system prompt."
      },
      "jsonSchema": {
        "description": "Optional JSON Schema for structured output.",
        "anyOf": [
          {
            "type": "string"
          },
          {}
        ]
      },
      "providerOptions": {
        "type": "object",
        "description": "AI SDK providerOptions passthrough, namespaced by provider. Examples: {\"gateway\":{\"serviceTier\":\"priority\"},\"openai\":{\"reasoningEffort\":\"low\"}}.",
        "additionalProperties": {}
      },
      "serviceTier": {
        "type": "string",
        "description": "Convenience alias for providerOptions.gateway.serviceTier when no explicit gateway serviceTier is provided.",
        "enum": [
          "flex",
          "priority"
        ]
      },
      "maxOutputTokens": {
        "type": "integer",
        "description": "Maximum output tokens for each model call. For reasoning models this budget includes reasoning and response tokens, so structured output needs enough headroom to complete.",
        "minimum": 1
      }
    },
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name                    | Type                      | Required | Default | Description |
| ----------------------- | ------------------------- | -------- | ------- | ----------- |
| `result.status`         | `"completed"`             | Yes      |         |             |
| `result.result`         | `object`                  | Yes      |         |             |
| `result.usage`          | `object`                  | Yes      |         |             |
| `result.meta`           | `object`                  | No       |         |             |
| `result.output`         | `string`                  | Yes      |         |             |
| `result.extracted_json` | `record \| array \| null` | Yes      |         |             |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "status": {
        "type": "string",
        "const": "completed"
      },
      "result": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "object": {
            "type": "object",
            "additionalProperties": {}
          },
          "finishReason": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "text",
          "finishReason"
        ],
        "additionalProperties": false
      },
      "usage": {
        "type": "object",
        "properties": {
          "inputTokens": {
            "type": "integer"
          },
          "outputTokens": {
            "type": "integer"
          },
          "totalTokens": {
            "type": "integer"
          }
        },
        "required": [
          "inputTokens",
          "outputTokens",
          "totalTokens"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "properties": {
          "model": {
            "type": "string"
          },
          "totalCostUsd": {
            "type": "number"
          },
          "jsonSchema": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "model"
        ],
        "additionalProperties": false
      },
      "output": {
        "type": "string"
      },
      "extracted_json": {
        "anyOf": [
          {
            "type": "object",
            "additionalProperties": {}
          },
          {
            "type": "array",
            "items": {}
          },
          {
            "type": "null"
          }
        ]
      }
    },
    "required": [
      "status",
      "result",
      "usage",
      "output",
      "extracted_json"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute deeplineagent_ai_inference --payload '{}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `provider_usage` (provider usage).
* Estimated Deepline credits: `0` per pricing unit.
* Billing mode: `post_deduct`.
