Spiral gives your agent every tool with one account. Browse the tools →

Perplexity · LLMReleased 2025-04-14

How to Use GPT-4.1 in Perplexity

GPT-4.1 is useful for code edits, detailed instructions, and analysis of long documents. Its 1,047,576-token context window is much larger than its 32,768-token output limit, so ask for focused results.

Prompts to try with GPT-4.1 in Perplexity

Copy an example into Perplexity, or ask in your own words.

Use GPT-4.1 to answer my latest question using only the source text in this conversation. Cite a short supporting excerpt for each conclusion. If the text does not answer part of the question, say so.

GPT-4.1Perplexity
Try asking
  • Use GPT-4.1 to compare the two policy descriptions in this conversation. Return a table of changed requirements, exceptions, and deadlines. Include supporting excerpts and leave unstated details blank.

  • Use GPT-4.1 to rewrite my latest draft in 200 words or fewer. Preserve every date, quantity, and qualification. Use plain English and return only the revised text.

  • Use GPT-4.1 to draft a reply to the customer message in this conversation using only the supplied policy. Keep it under 150 words. If an essential detail is missing, ask one focused question instead of assuming an answer.

  • Use GPT-4.1 to rank the passages in this conversation by how directly they answer my question. Return the five most relevant passages with their labels and a one-sentence explanation for each.

How to set up GPT-4.1 in Perplexity

Pick the way that suits you. Each takes about two minutes.

Use the Perplexity connector

  1. Add a remote connector

    In Perplexity, open Plugins in the sidebar (or Customize › Connectors if you don't see Plugins yet). Choose Add custom › Add MCP connector, then Remote. Name it Spiral and paste this MCP server URL:

    https://api.spiral.ai/mcp
  2. Sign in to Spiral and approve

    Select the Spiral card on the Plugins page to start sign-in. Spiral opens: sign in, pick the organization and click Authorize. No API key.

Use the Spiral skill

  1. Send Perplexity this message

    Your agent reads Spiral's skill and sets itself up.

    set up https://spiral.ai/SKILL.md
  2. Sign in or paste a key

    Approve Spiral in the browser, or give the agent a key from the console.

Use the Spiral CLI

  1. Install and sign in

    Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run GPT-4.1

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "openai",
        "model": "openai/gpt-4.1",
        "input": {
          "messages": [
            {
              "role": "system"
            }
          ]
        }
      }'

Then paste one of the prompts above: Perplexity finds GPT-4.1 on Spiral, shows the price and runs it.

GPT-4.1 providers and prices

Spiral runs GPT-4.1 through OpenAI. Open a card for today's price, with every fee included.

OpenAIDeprecatedLLM
GPT-4.1
openai/gpt-4.1

Settings you can ask for

Ask Perplexity for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Seeda whole number
Top p0 to 1
Logprobson or off
Max tokensa whole number from 16

The most output tokens to generate.

Temperature0 to 2
Top logprobs0 to 20
Presence penalty-2 to 2
Frequency penalty-2 to 2
Parallel tool callson or off

Every API field of GPT-4.1 is on its tool page: open its card above.

What can you do with GPT-4.1 in Perplexity?

GPT-4.1 can turn long pasted material into focused answers, comparisons, and response drafts. State the evidence rules and desired format so the result answers your question directly.

Focused bug fixes

Ask GPT-4.1 to trace a reported failure, change the relevant code, and return a patch with verification results.

Pull request review

Give GPT-4.1 a diff and surrounding code. Request actionable findings with a concrete failure scenario for each.

Questions across long documents

Use GPT-4.1 to locate relevant passages across supplied material and answer a narrow question with supporting excerpts.

Structured record extraction

Have GPT-4.1 turn unstructured text into records, leaving unsupported values empty and retaining evidence for review.

Policy-based response drafts

Ask GPT-4.1 to draft replies using supplied policies, explicit exceptions, and a defined response format.

Recurring source digests

Use GPT-4.1 to select relevant updates from supplied text and produce a digest with source references.

Search result ranking

Give GPT-4.1 a question and candidate passages. Request a ranked shortlist with a relevance explanation for each selection.

Constrained text rewrites

Ask GPT-4.1 to rewrite supplied text while preserving specified facts, following a length target, and avoiding named terms.

Questions about GPT-4.1 in Perplexity

Can Perplexity use GPT-4.1?

Yes. Add Spiral to Perplexity as an MCP server, and Perplexity can find and run GPT-4.1 like any built-in tool.

How much does GPT-4.1 cost in Perplexity?

Up to $0.04269 per run at the default inputs. $2.60 per 1M input tokens, $0.65 per 1M cached input tokens, $10.40 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Perplexity plan is separate.

Do I need an OpenAI account to use GPT-4.1 in Perplexity?

No. Spiral runs GPT-4.1 on its own OpenAI account. You sign in to Spiral once and never paste a key.

How long does it take to set up GPT-4.1 in Perplexity?

About two minutes: add a remote connector, then sign in to Spiral and approve.

Does Perplexity wait while GPT-4.1 runs?

GPT-4.1 runs in the background. Perplexity starts the run, checks on it and gives you the text, json when it's ready.

What is GPT-4.1 good at?

GPT-4.1 is useful for code editing, code review, and tasks with detailed response requirements. Its training includes following code diff formats, which makes focused patches a practical use.

How much can GPT-4.1 read and write?

The context window is 1,047,576 tokens, while one response can contain at most 32,768 output tokens. A large input allowance does not mean it can reproduce an equally large document in one answer.

Where does GPT-4.1 struggle with long documents?

Retrieving many separate details from a long context can reduce accuracy. For exhaustive extraction, split the task into smaller sections and check the combined results against the source.

How should I prompt GPT-4.1?

State the task, required format, and exceptions explicitly because GPT-4.1 interprets instructions literally. Specify what it should return when information is missing.

Does valid JSON mean GPT-4.1 extracted the right answer?

No. Structured Outputs can enforce the requested schema, but the values can still be wrong; check extracted facts against the original text.

Get started

Start using GPT-4.1 in Perplexity

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into Perplexity:

Set up Perplexity

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options