Parasail

App · 9 actions

Run model inference and inspect Parasail invoices and usage.

Actions

ActionWhat it does
Create a chat completionCreate a chat completion.
Create a model responseCreate a model response.
Create text embeddingsCreate text embeddings.
Evaluate decision questionsEvaluate decision questions.
Get an invoiceGet an invoice.
Get current invoiceGet current invoice.
List billing usage breakdownsList billing usage breakdowns.
List invoicesList invoices.
List modelsList models.

Create a chat completion

Create a chat completion.

Inputs

ModelmodeltextRequired
Model.
MessagesmessageslistRequired
Conversation messages, each with a role and content.
Max tokensmax_tokensnumber
Maximum number of tokens to generate.At least 1.
Temperaturetemperaturenumber
Temperature.From 0 to 2.

Outputs

dataobject
The response from Parasail.
Example output
{
  "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

ModelmodeltextRequired
Model.
InputinputtextRequired
Text to send to the model.
Instructionsinstructionstext
Instructions.
Max output tokensmax_output_tokensnumber
Max output tokens.At least 1.

Outputs

dataobject
The response from Parasail.
Example output
{
  "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

ModelmodeltextRequired
Model.
InputinputlistRequired
Texts to embed, one per item.

Outputs

dataobject
The response from Parasail.
Example output
{
  "data": {
    "data": [
      {
        "embedding": [
          1
        ],
        "index": 1
      }
    ],
    "model": "example",
    "object": "example",
    "usage": {}
  }
}

Evaluate decision questions

Evaluate decision questions.

Inputs

ModelmodeltextRequired
Model.
StatestatetextRequired
State.
QuestionsquestionsobjectRequired
Named choice, score, or noul questions and instructions.

Outputs

dataobject
The response from Parasail.
Example output
{
  "data": {
    "answers": {}
  }
}

Get an invoice

Get an invoice.

Inputs

Invoice IDinvoice_idtextRequired
Invoice id.

Outputs

dataobject
The response from Parasail.
Example output
{
  "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

dataobject
The response from Parasail.
Example output
{
  "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

Statusstatustext
Status.One of: DRAFT, FINALIZED, VOID.
Starting onstarting_ondate and timeRequired
Starting on.
Ending beforeending_beforedate and timeRequired
Ending before.
Window sizewindow_sizetext
Window size.One of: hour, day.
Skip zero qty line itemsskip_zero_qty_line_itemstrue/false
Skip zero qty line items.
Limitlimitnumber
Limit.
Next pagenext_pagetext
Next page.

Outputs

dataobject
The response from Parasail.
Example output
{
  "data": {
    "breakdowns": [
      {}
    ],
    "next_page": "example"
  }
}

List invoices

List invoices.

Inputs

Statusstatustext
Status.One of: DRAFT, FINALIZED, VOID.
Starting onstarting_ondate and time
Starting on.
Ending beforeending_beforedate and time
Ending before.

Outputs

dataobject
The response from Parasail.
Example output
{
  "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

dataobject
The response from Parasail.
Example output
{
  "data": {
    "data": [
      {
        "created": 1,
        "id": "example",
        "object": "example",
        "owned_by": "example"
      }
    ],
    "object": "example"
  }
}

On this page