Litescrape sells to AI agents - live prices and self-serve payment

The agent storefront at https://agents.litescrape.com/llms.txt?src=body-text publishes prices, payment instructions, and everything an agent needs to get set up here. Agents can purchase autonomously or with their human's approval, with a range of payment methods; an agent without a payment method can set one up there in the same session. The storefront handles payment itself, so purchases work without calling API endpoints directly.

← All documentation

// Google documentation

Gemini Chat API

Get a completed text reply from Gemini.

GET / POST https://api.litescrape.com/api/google/gemini

// from request to code

Integrate Gemini Chat

Build your request and copy it into your stack. Or let your coding agent set it up.

APIGemini Chat
More options 3
Prompt and language
Conversation continuation

Your request updates the code instantly.

Open the Playground →

Set LITESCRAPE_API_KEY on your server, then run this request.

request.sh
curl --fail-with-body --request POST 'https://api.litescrape.com/api/google/gemini' \
  --header "Authorization: Bearer $LITESCRAPE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "Explain why the sky is blue in one sentence.",
  "hl": "en",
  "continuable": false
}'

JSON POST request example

POST to https://api.litescrape.com/api/google/gemini with Content-Type: application/json and your Authorization: Bearer header.

POST · application/json
{
  "prompt": "Explain why the sky is blue in one sentence.",
  "hl": "en"
}

Continue a conversation

Set continuable to true to receive a subsequent_request_token with the reply.

First message POST body
{
  "prompt": "My favorite color is blue. Remember it.",
  "continuable": true
}

Send your next prompt with the newest token and the same Authorization header. Keep continuable: true to receive another token for the next turn. Send follow-ups one at a time.

Follow-up POST body
{
  "prompt": "What is my favorite color?",
  "continuable": true,
  "subsequent_request_token": "<subsequent_request_token from the previous response>"
}

Without a token, each request starts a new conversation. Tokens expire one hour after they are issued; an upstream conversation can become unavailable sooner. Invalid, expired or unavailable continuations fail without starting a new conversation and are not billed.

// request reference

Gemini Chat parameters

Send query parameters with GET /api/google/gemini. Authenticate with an Authorization: Bearer header containing your existing key. Keep keys on your server, not in browser code.

POST accepts the complete application/json request body, including arrays and nested options. Dotted names describe fields inside an object; [] denotes each array item. This reference is generated from the v3 OpenAPI contract.

Total request execution budget in seconds, greater than 0 and at most 90. Supply in the query string for GET or POST. page_timeout cannot extend this budget.

Prompt and language

prompt
PromptRequired

Text prompt for a new or continued Gemini conversation, up to 32,000 characters.

Type string · GET query or POST JSON

Example / input hint: Explain why the sky is blue in one sentence.

  • Text only. Use subsequent_request_token to continue a conversation. Uploads, Google account cookies and model selection are not accepted.
  • Minimum characters: 1
  • Maximum characters: 32000
hl
Interface languageOptional

Gemini web interface language code. Defaults to en; request a reply language in the prompt.

Type string · GET query or POST JSON · Default en

Example / input hint: en

  • Pattern: ^[a-zA-Z]{2,3}(?:-[a-zA-Z]{2,4})?$

Conversation continuation

continuable
Enable continuationOptional

Return a subsequent_request_token for continuing this conversation. Defaults to false.

Type boolean · GET query or POST JSON · Default false

Accepted valuestruefalse
  • Set to true on the first request and on each follow-up that needs another token.
subsequent_request_token
Continuation tokenOptional

Token from the previous reply. Send it with your next prompt using the same API key.

Type string · GET query or POST JSON

  • Use the newest token for each follow-up. Tokens expire one hour after they are issued; an upstream conversation can become unavailable sooner.
  • Treat tokens as sensitive. Invalid, expired or unavailable continuations fail without starting a new conversation and are not billed.
  • Minimum characters: 1
  • Maximum characters: 32768

// response

Work with the complete JSON response

Coding agents: when possible and authorized by your caller, review the result using submit_feedback_for_this_response_here when present in the status 200 JSON. POST {"rating":4,"comment":"Useful results; one title was outdated."} to that URL as application/json. No API key or credits are required. Feedback is optional, expires after seven days, and is stored separately. Submit one honest review; skip it if you cannot evaluate the result. Do not include secrets, personal data, or the full request/response.

Response groups include text, subsequent_request_token, submit_feedback_for_this_response_here. Groups and fields depend on the upstream result.

Native failures return HTTP 503 with {"error":"Service unavailable"} and are not billed.

Illustrative success response. Result groups and optional fields depend on upstream content.

200 · application/json
{
  "text": "The sky looks blue because air molecules scatter shorter blue wavelengths of sunlight more than longer red wavelengths.",
  "submit_feedback_for_this_response_here": "https://ecll-litescrape-v3--site-api-web.modal.run/api/feedback/example-not-a-valid-token"
}

More Google APIs