# TextCortex

> Write, rewrite, summarize and translate text with TextCortex's AI models, choose from the models your account can use, and check your API credit.

App · 4 actions. Web page: https://docs.lodol.com/docs/integrations/textcortex

## Actions

### Generate text

Ask a TextCortex model to write something: an answer, a rewrite, a summary, a translation or a draft. Returns the text and how many tokens it used.

**Inputs**

- Model (`model`, text, required): The model that writes the answer. Pick one, or give its id from an earlier step.
- Prompt (`prompt`, text, required): What you want the model to do or answer.
- System prompt (`instructions`, text): Standing instructions for how to answer, such as the role, tone or format. Optional.
- Temperature (`temperature`, number): How varied the wording is, from 0 (most predictable) to 1 (most varied). Leave empty for the model's own default. From 0 to 1.
- Top P (`top_p`, number): Only consider the most likely words that add up to this share, from 0 to 1. Change this or Temperature, not both. Optional. From 0 to 1.
- Max output tokens (`max_output_tokens`, number): The most the model may write (a token is about three quarters of a word). At least 16. Reasoning models also spend these on thinking, so leave it empty unless you need a hard cap. At least 16.

**Outputs**

- `input_tokens` (number): Tokens in the prompt
- `model` (text): The model that answered
- `output_tokens` (number): Tokens in the answer
- `response_id` (text): TextCortex's id for this answer
- `status` (text): completed, or incomplete if cut off
- `text` (text): The model's answer
- `total_tokens` (number): Tokens used in all
- `truncated` (true/false): True if the model hit 'Max output tokens' mid-answer

**Example output**

```json
{
  "input_tokens": 23,
  "model": "claude-sonnet-5-5",
  "output_tokens": 28,
  "response_id": "resp_3925af9407844ff086b65ce34d6ea8f7",
  "status": "completed",
  "text": "A steel bottle that keeps drinks cold all day.",
  "total_tokens": 51,
  "truncated": false
}
```

### Get credit balance

Check how much API credit is left on the account.

**Inputs**: None.

**Outputs**

- `billing_source` (text): What the key is billed to, such as api_credits
- `can_buy_credits` (true/false): Whether the account can top up API credit
- `currency` (text): The currency, such as EUR
- `remaining_credits` (number): API credit left, in the currency below

**Example output**

```json
{
  "billing_source": "api_credits",
  "can_buy_credits": true,
  "currency": "EUR",
  "remaining_credits": 1.0
}
```

### Get model

Get one model, including the country it is served from.

**Inputs**

- Model (`model_id`, text, required): The model to read. Pick one, or give its id from an earlier step.

**Outputs**

- `model` (object): The model

**Example output**

```json
{
  "model": {
    "deployment_jurisdiction": "US",
    "id": "claude-sonnet-5-5",
    "owned_by": "textcortex",
    "released_at": "2026-09-27T00:00:00Z",
    "served_from_country_code": "US"
  }
}
```

### List models

List every model this API key can generate text with.

**Inputs**: None.

**Outputs**

- `count` (number): How many models
- `models` (list): The models

**Example output**

```json
{
  "count": 1,
  "models": [
    {
      "deployment_jurisdiction": "US",
      "id": "claude-sonnet-5-5",
      "owned_by": "textcortex",
      "released_at": "2026-09-27T00:00:00Z",
      "served_from_country_code": "US"
    }
  ]
}
```
