# Parasail

> Run model inference and inspect Parasail invoices and usage.

App · 9 actions. Web page: https://docs.lodol.com/docs/integrations/parasail

## Actions

### Create a chat completion

Create a chat completion.

**Inputs**

- Model (`model`, text, required): Model.
- Messages (`messages`, list, required): Conversation messages, each with a role and content.
- Max tokens (`max_tokens`, number): Maximum number of tokens to generate. At least 1.
- Temperature (`temperature`, number): Temperature. From 0 to 2.

**Outputs**

- `data` (object): The response from Parasail.

**Example output**

```json
{
  "data": {
    "choices": [
      {
        "finish_reason": "example",
        "index": 1,
        "message": {
          "content": "example",
          "role": "example"
        }
      }
    ],
    "id": "example",
    "model": "example",
    "usage": {
      "completion_tokens": 1,
      "prompt_tokens": 1,
      "total_tokens": 1
    }
  }
}
```

### Create a model response

Create a model response.

**Inputs**

- Model (`model`, text, required): Model.
- Input (`input`, text, required): Text to send to the model.
- Instructions (`instructions`, text): Instructions.
- Max output tokens (`max_output_tokens`, number): Max output tokens. At least 1.

**Outputs**

- `data` (object): The response from Parasail.

**Example output**

```json
{
  "data": {
    "error": {},
    "id": "example",
    "model": "example",
    "output": [
      {}
    ],
    "status": "example",
    "usage": {
      "input_tokens": 1,
      "output_tokens": 1,
      "total_tokens": 1
    }
  }
}
```

### Create text embeddings

Create text embeddings.

**Inputs**

- Model (`model`, text, required): Model.
- Input (`input`, list, required): Texts to embed, one per item.

**Outputs**

- `data` (object): The response from Parasail.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "embedding": [
          1
        ],
        "index": 1
      }
    ],
    "model": "example",
    "object": "example",
    "usage": {}
  }
}
```

### Evaluate decision questions

Evaluate decision questions.

**Inputs**

- Model (`model`, text, required): Model.
- State (`state`, text, required): State.
- Questions (`questions`, object, required): Named choice, score, or noul questions and instructions.

**Outputs**

- `data` (object): The response from Parasail.

**Example output**

```json
{
  "data": {
    "answers": {}
  }
}
```

### Get an invoice

Get an invoice.

**Inputs**

- Invoice ID (`invoice_id`, text, required): Invoice id.

**Outputs**

- `data` (object): The response from Parasail.

**Example output**

```json
{
  "data": {
    "billable_status": "example",
    "end_timestamp": "example",
    "id": "example",
    "issued_at": "example",
    "line_items": [
      {}
    ],
    "start_timestamp": "example",
    "status": "example",
    "total": 1,
    "type": "example"
  }
}
```

### Get current invoice

Get current invoice.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Parasail.

**Example output**

```json
{
  "data": {
    "billable_status": "example",
    "end_timestamp": "example",
    "id": "example",
    "issued_at": "example",
    "line_items": [
      {}
    ],
    "start_timestamp": "example",
    "status": "example",
    "total": 1,
    "type": "example"
  }
}
```

### List billing usage breakdowns

List billing usage breakdowns.

**Inputs**

- Status (`status`, text): Status. One of: `DRAFT`, `FINALIZED`, `VOID`.
- Starting on (`starting_on`, date and time, required): Starting on.
- Ending before (`ending_before`, date and time, required): Ending before.
- Window size (`window_size`, text): Window size. One of: `hour`, `day`.
- Skip zero qty line items (`skip_zero_qty_line_items`, true/false): Skip zero qty line items.
- Limit (`limit`, number): Limit.
- Next page (`next_page`, text): Next page.

**Outputs**

- `data` (object): The response from Parasail.

**Example output**

```json
{
  "data": {
    "breakdowns": [
      {}
    ],
    "next_page": "example"
  }
}
```

### List invoices

List invoices.

**Inputs**

- Status (`status`, text): Status. One of: `DRAFT`, `FINALIZED`, `VOID`.
- Starting on (`starting_on`, date and time): Starting on.
- Ending before (`ending_before`, date and time): Ending before.

**Outputs**

- `data` (object): The response from Parasail.

**Example output**

```json
{
  "data": {
    "invoices": [
      {
        "billable_status": "example",
        "end_timestamp": "example",
        "id": "example",
        "issued_at": "example",
        "line_items": [
          {}
        ],
        "start_timestamp": "example",
        "status": "example",
        "total": 1,
        "type": "example"
      }
    ]
  }
}
```

### List models

List models.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Parasail.

**Example output**

```json
{
  "data": {
    "data": [
      {
        "created": 1,
        "id": "example",
        "object": "example",
        "owned_by": "example"
      }
    ],
    "object": "example"
  }
}
```
