API reference

Everything you need to call ToolArtisan tools from your own code.

Introduction

The ToolArtisan API is a REST API over HTTPS. Requests take JSON or multipart/form-data for file uploads, and most responses are JSON. Every request runs to completion and returns the result directly, with no polling or webhooks to set up.

Base URL

https://toolartisan.com/api

  1. Create an API key in the developer console.
  2. Store it in an environment variable such as TOOLARTISAN_API_KEY.
  3. Call any endpoint below. Start with GET /v1/account to check your key.

Authentication

Send your key in the Authorization header as a bearer token. Keys start with ta_live_. The X-API-Key header also works.

cURL
curl https://toolartisan.com/api/v1/account \
  -H "Authorization: Bearer ta_live_…"

Credits

Each plan includes a monthly number of credits that resets on the 1st (UTC). A request is charged after it succeeds, based on what it actually used. Failed requests are free.

  • AI text: 1 credit per 1,000 input tokens plus 1 credit per 250 output tokens, rounded up, at least 1. A token is about 4 characters of English text.
  • Transcription: 2 credits per started audio minute.
  • OCR: 1 credit per scanned page.
  • File tools: a flat cost per request (see each endpoint).
  • Utilities and account: free, but they still count toward the rate limit.

A request that starts with credits left always finishes, so your balance can briefly go past the limit. Every response includes these headers:

X-Credits-ChargedCredits this request cost.
X-Credits-RemainingCredits left this month.
X-Request-IdID to quote to support. Also listed in the console.

See API pricing for plans.

Rate limits

Limits apply per account, across all of its keys, over a rolling minute. Over the limit you get 429 with a Retry-After header in seconds.

PlanRequests / minuteCredits / month
Sandbox10100
Developer605,000
Growth24020,000
Scale60075,000

Responses also include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset (seconds until the window frees up). Transcription and OCR can take a while; set client timeouts of a few minutes for those.

Errors

Errors use standard HTTP status codes and a JSON body. message is human-readable; data.code, when present, is stable and safe to branch on.

Error response
{
  "error": true,
  "statusCode": 402,
  "statusMessage": "You have used all 5,000 credits for this month. Upgrade your API plan or wait until 2026-11-01.",
  "message": "You have used all 5,000 credits for this month. Upgrade your API plan or wait until 2026-11-01.",
  "data": {
    "code": "credits_exhausted"
  }
}
StatusCodeMeaning
400-The body is missing a field or a value is out of range. The message names the field.
401missing_api_keyNo key was sent.
401invalid_api_keyThe key is wrong or its account was deleted.
401revoked_api_keyThe key was revoked in the console.
402credits_exhaustedNo credits left this month. Upgrade or wait for the reset.
403account_suspendedThe account is suspended. Contact support.
413-The uploaded file is larger than the endpoint allows.
422invalid_json, invalid_base64The input could not be parsed.
429rate_limitedToo many requests this minute. Wait for Retry-After seconds.
502-The AI model returned something unusable. Safe to retry.
503maintenanceThe service is down for maintenance, or a backing engine is offline. Retry later.

Account

Account and credits

Free

GET/v1/account

Returns the plan, monthly credit balance, and rate limit for the key used.

Request No body

No parameters.

Response application/json

200 OK
{
  "key": {
    "id": "key_8f2k1q",
    "name": "Production"
  },
  "plan": {
    "id": "developer",
    "name": "Developer",
    "requestsPerMinute": 60
  },
  "credits": {
    "limit": 5000,
    "used": 1240,
    "remaining": 3760,
    "resetsAt": "2026-11-01T00:00:00.000Z"
  }
}

Example

curl https://toolartisan.com/api/v1/account \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY"

Text AI

Summarize text

1 credit / 1K input tokens, 1 / 250 output tokens

POST/v1/summarize

Condenses an article, report, or transcript into a summary and key points.

Request application/json

  • textstringRequired

    40 to 150,000 characters.

  • length"short" | "medium" | "long"

    Default "medium".

  • tone"neutral" | "formal" | "casual"

    Default "neutral".

Response application/json

200 OK
{
  "summary": "The article argues that…",
  "keyPoints": [
    "First point",
    "Second point"
  ]
}

Example

curl -X POST https://toolartisan.com/api/v1/summarize \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Paste the article you want summarized here. It needs at least forty characters.","length":"short"}'

Translate text

1 credit / 1K input tokens, 1 / 250 output tokens

POST/v1/translate

Translates text between languages, keeping formatting and line breaks.

Request application/json

  • textstringRequired

    1 to 30,000 characters.

  • sourcestring

    Language name or "auto" to detect. Default "auto".

  • targetstringRequired

    Target language, e.g. "Spanish".

Response application/json

200 OK
{
  "translation": "Hola, ¿cómo estás?"
}

Example

curl -X POST https://toolartisan.com/api/v1/translate \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello, how are you?","source":"auto","target":"Spanish"}'

Ad copy

1 credit / 1K input tokens, 1 / 250 output tokens

POST/v1/ad-copy

Writes headline, description, and call-to-action variations for an ad platform.

Request application/json

  • productstringRequired

    2 to 500 characters.

  • audiencestring

    Who the ad is for.

  • detailsstring

    Offers, features, or anything to mention.

  • platform"google" | "meta" | "linkedin"

    Default "google".

  • tone"bold" | "friendly" | "premium"

    Default "bold".

Response application/json

200 OK
{
  "variations": [
    {
      "headline": "Focus, finally",
      "description": "Block out the noise…",
      "cta": "Shop now"
    }
  ]
}

Example

curl -X POST https://toolartisan.com/api/v1/ad-copy \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"product":"Noise-cancelling headphones","audience":"Remote workers","platform":"meta","tone":"friendly"}'

Blog post

1 credit / 1K input tokens, 1 / 250 output tokens

POST/v1/blog

Turns notes, an outline, or a transcript into a structured Markdown article.

Request application/json

  • sourcestringRequired

    Notes or outline, 10 to 60,000 characters.

  • tone"professional" | "friendly" | "technical"

    Default "professional".

  • wordsnumber

    Target length, 300 to 2,000. Default 800.

Response application/json

200 OK
{
  "markdown": "# Why small teams should automate invoicing\n\n…"
}

Example

curl -X POST https://toolartisan.com/api/v1/blog \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source":"Why small teams should automate invoicing: saves time, fewer errors, faster payment.","words":600}'

Quiz

1 credit / 1K input tokens, 1 / 250 output tokens

POST/v1/quiz

Generates multiple-choice questions with answers and explanations from study material.

Request application/json

  • sourcestringRequired

    80 to 80,000 characters.

  • countnumber

    3 to 15 questions. Default 5.

  • difficulty"easy" | "medium" | "hard"

    Default "medium".

Response application/json

200 OK
{
  "questions": [
    {
      "question": "What does photosynthesis release?",
      "options": [
        "Oxygen",
        "Nitrogen",
        "Carbon dioxide",
        "Hydrogen"
      ],
      "correct": 0,
      "explanation": "Oxygen is released…"
    }
  ]
}

Example

curl -X POST https://toolartisan.com/api/v1/quiz \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source":"Photosynthesis converts light energy into chemical energy stored in glucose, releasing oxygen as a by-product…","count":3}'

Chat

1 credit / 1K input tokens, 1 / 250 output tokens

POST/v1/chat

A conversational assistant. Send the conversation so far and get the next reply.

Request application/json

  • messages{ role: "user" | "assistant", text: string }[]Required

    1 to 40 messages, oldest first.

  • attachment{ name, mediaType, data }

    Optional image (image/jpeg, image/png, image/gif, image/webp) or application/pdf, base64-encoded in data, up to about 10 MB.

Response application/json

200 OK
{
  "reply": "Here are three ideas: …",
  "document": null
}

Example

curl -X POST https://toolartisan.com/api/v1/chat \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"messages":[{"role":"user","text":"Give me three names for a coffee shop."}]}'

Documents

PDF text extraction (OCR)

1 credit / page

POST/v1/pdf/ocr

Extracts text from scanned or image-based PDFs.

Request multipart/form-data

  • filefileRequired

    PDF, up to 30 MB and 100 pages.

  • languagestring

    Main document language, e.g. "English". Default auto.

Response application/json

200 OK
{
  "text": "Extracted text…",
  "provider": "paddleocr",
  "ocrPages": 3
}

Example

curl -X POST https://toolartisan.com/api/v1/pdf/ocr \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -F "[email protected]" \
  -F "language=English"

Compress PDF

1 credit / request

POST/v1/pdf/compress

Shrinks a PDF by downsampling images. Returns the compressed PDF.

Request multipart/form-data

  • filefileRequired

    PDF, up to 100 MB.

  • level"strong" | "balanced" | "light"

    Images at 72, 150, or 220 dpi. Default "balanced".

Response application/pdf

The compressed PDF as binary. Headers X-Original-Size and X-Compressed-Size give the byte sizes.

Example

curl -X POST https://toolartisan.com/api/v1/pdf/compress \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -F "[email protected]" \
  -F "level=balanced" \
  -o compressed.pdf

Audio & video

Transcribe audio or video

2 credits / audio minute

POST/v1/transcribe

Speech to text with timestamps and speaker turns. The request waits until the transcript is ready.

Request multipart/form-data

  • filefileRequired

    Audio or video, up to 1 GB and 60 minutes.

  • languagestring

    Spoken language code such as "en", or "auto". Default "auto".

Response application/json

200 OK
{
  "job": {
    "id": "job_…",
    "status": "completed",
    "language": "en",
    "duration": 754,
    "conversation": "Person-1: Thanks everyone for joining.",
    "lines": [
      {
        "speaker": "Person-1",
        "text": "Thanks everyone for joining.",
        "start": 0,
        "end": 4.2
      }
    ]
  }
}

Example

curl -X POST https://toolartisan.com/api/v1/transcribe \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -F "[email protected]" \
  -F "language=en"

Meeting notes

1 credit / 1K input tokens, 1 / 250 output tokens

POST/v1/transcribe/notes

Turns a transcript into a summary, key points, discussion, action items, and topics.

Request application/json

  • transcriptstringRequired

    20 to 120,000 characters.

  • sessionType"meeting" | "lecture" | "interview" | "general"

    Default "meeting".

  • titlestring

    Optional title to guide the summary.

Response application/json

200 OK
{
  "title": "Beta launch planning",
  "summary": "The team agreed to ship the beta on Friday.",
  "keyPoints": [
    "Beta ships Friday"
  ],
  "discussion": [
    "Onboarding emails"
  ],
  "actionItems": [
    "Ben: finish onboarding emails by Thursday"
  ],
  "topics": [
    "Launch"
  ]
}

Example

curl -X POST https://toolartisan.com/api/v1/transcribe/notes \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"transcript":"Anna: Let us ship the beta on Friday. Ben: I will finish the onboarding emails by Thursday.","sessionType":"meeting"}'

Images

Image to SVG (AI)

50 credits / request

POST/v1/vectorize

Converts a raster image into a clean SVG using the AI vectorizer. Best for logos and illustrations.

Request multipart/form-data

  • imagefileRequired

    PNG, JPG, WebP, GIF, or BMP, up to 30 MB.

Response image/svg+xml

The SVG document as text.

Example

curl -X POST https://toolartisan.com/api/v1/vectorize \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -F "[email protected]" \
  -o output.svg

Image to SVG (tracing)

1 credit / request

POST/v1/vectorize/trace

Fast, low-cost color tracing. Good for simple graphics and icons.

Request multipart/form-data

  • imagefileRequired

    PNG, JPG, WebP, GIF, or BMP, up to 30 MB.

  • colormode"color" | "binary"

    Default "color".

  • mode"spline" | "polygon" | "none"

    Curve fitting. Default "spline".

  • color_precisionnumber

    1 to 8. Higher keeps more colors.

  • filter_specklenumber

    Discard patches smaller than this many pixels.

  • corner_thresholdnumber

    Angle in degrees treated as a corner.

Response image/svg+xml

The SVG document as text.

Example

curl -X POST https://toolartisan.com/api/v1/vectorize/trace \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -F "[email protected]" \
  -F "colormode=color" \
  -o output.svg

Utilities

Text statistics

Free

POST/v1/text/stats

Counts words, characters, sentences, and paragraphs, and estimates reading time.

Request application/json

  • textstringRequired

    Up to 1,000,000 characters.

Response application/json

200 OK
{
  "words": 6,
  "characters": 35,
  "charactersNoSpaces": 30,
  "sentences": 2,
  "paragraphs": 1,
  "readingTimeSeconds": 2
}

Example

curl -X POST https://toolartisan.com/api/v1/text/stats \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"One sentence here. And another one."}'

Convert case

Free

POST/v1/text/case

Converts text to upper, lower, title, sentence, camel, snake, kebab, or Pascal case.

Request application/json

  • textstringRequired

    Up to 1,000,000 characters.

  • to"upper" | "lower" | "title" | "sentence" | "camel" | "snake" | "kebab" | "pascal"Required

    Target case.

Response application/json

200 OK
{
  "result": "helloWorldExample"
}

Example

curl -X POST https://toolartisan.com/api/v1/text/case \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"hello world example","to":"camel"}'

Format JSON

Free

POST/v1/json/format

Validates JSON and returns it pretty-printed or minified. Invalid JSON returns 422 with the parse error.

Request application/json

  • jsonstringRequired

    The JSON text, up to 5 MB.

  • indentnumber

    0 to minify, or 1 to 8 spaces. Default 2.

  • sortKeysboolean

    Sort object keys alphabetically. Default false.

Response application/json

200 OK
{
  "valid": true,
  "result": "{\n  \"a\": [\n    1,\n    2\n  ],\n  \"b\": 1\n}"
}

Example

curl -X POST https://toolartisan.com/api/v1/json/format \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"json":"{\"b\":1,\"a\":[1,2]}","indent":2,"sortKeys":true}'

Base64

Free

POST/v1/base64

Encodes UTF-8 text to Base64, or decodes Base64 back to text.

Request application/json

  • textstringRequired

    Up to 5 MB.

  • mode"encode" | "decode"Required

    Direction.

  • urlSafeboolean

    Use the URL-safe alphabet without padding. Default false.

Response application/json

200 OK
{
  "result": "SGVsbG8="
}

Example

curl -X POST https://toolartisan.com/api/v1/base64 \
  -H "Authorization: Bearer $TOOLARTISAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello","mode":"encode"}'

Need an endpoint we don't have yet?

Tell us what you're building and we'll prioritise it.

Contact us