Xquik Subscribe API

Subscription, billing, and credits

Business capability
Payment Collection & Dunning BC-4250.40

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /api/v1/subscribe Start a subscription checkout · Create subscription checkout #
Ask an LLM
“How do I start a paid subscription?”
“Can I get a link to manage my billing?”
Tell an agent
Create a subscription checkout for the {tier} tier.
Get me a subscription checkout link.
GET /api/v1/credits Check my credit balance · Get credits balance #
Ask an LLM
“How many credits do I have left?”
“What is my current credit balance?”
Tell an agent
Show my credit balance.
Check how many credits remain on my account.
POST /api/v1/credits/topup Buy credits through a hosted checkout · Create credit top-up checkout #
Ask an LLM
“Can I buy more credits through a hosted checkout?”
“Does creating a top-up checkout add credits right away?”
Tell an agent
Create a credit top-up checkout for {dollars} dollars.
Start a {dollars} dollar credit purchase checkout in locale {locale}.
GET /api/v1/credits/topup/status Check a credit top-up's billing status · Get top-up billing status #
Ask an LLM
“Did my credit top-up payment succeed?”
“Can I check the billing status of a checkout session?”
Tell an agent
Check top-up status for session {session_id}.
Tell me whether checkout {session_id} has been paid.
POST /api/v1/credits/quick-topup Charge my saved card for credits · Charge saved card for credits #
Ask an LLM
“Can I buy credits instantly with my saved card?”
“Is there a one-click credit top-up that skips the checkout page?”
Tell an agent
Charge my saved card {dollars} dollars for credits.
Quick top-up {dollars} dollars of credits on my card on file.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/xquik-api:xquik-api-subscribe-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

xquik-api-subscribe-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Xquik Subscribe API
  version: '1.0'
  description: Xquik is an independent third-party service.
  x-guidance: '## Common tasks


    **Find a tweet** - GET /x/tweets/{id}. Returns text, author, metrics, media, and creation time. Cost: $0.00015 per lookup.


    **Search tweets** - GET /x/tweets/search?q={query}&limit={n}. Supports X operators, structured filters, Tweet IDs, and status URLs. Omit mode for automatic coverage. Cost: $0.00015 per returned tweet.


    **Find a user** - GET /x/users/{id}. Accepts an ID or username. Cost: $0.00015 per lookup.


    **Check if A follows B** - GET /x/followers/check?source={a}&target={b}. Accepts usernames or profile URLs. Cost: $0.00075.


    **Get trends** - GET /trends?woeid={region}&count={n}. WOEID 1 is worldwide. Cost: $0.00045.


    **Download media** - POST /x/media/download with `tweetIds`. Fresh Tweets cost 1 credit each. Cached repeats are free.


    **Read an article** - GET /x/articles/{tweetId}. Cost: $0.00075.


    ## Pagination


    Default platform pages return `hasMore` and `nextCursor`. X pages return `has_next_page` and `next_cursor`. The 2026-04-29 contract returns `has_more` and `next_cursor`. Pass cursors through `cursor`; `after` remains compatible. Dynamic pricing counts returned items, not requests.


    Omit `mode` for automatic reads. Pass cursors unchanged. `mode=standard` remains legacy. Retry 409 responses after `Retry-After`. Restart 410 responses without a cursor.


    ## Authentication


    Eligible reads accept guest wallets. Fixed-price lookups also accept MPP. Other features require an API key or OAuth 2.1 bearer token. API keys also support `Authorization: Bearer xq_...`.


    ## Best-Practice Response Contract


    v1 remains the default. Send `xquik-api-contract: 2026-04-29` for snake_case, Unix timestamps, structured errors, unified pagination, resource objects, and prefixed IDs. Dependency failures use 424 instead of 502.'
  contact:
    name: Xquik
    url: https://xquik.com
    email: support@xquik.com
servers:
- url: https://xquik.com
security:
- apiKey: []
- oauthBearer: []
tags:
- name: Subscribe
  description: Subscription, billing, and credits
paths:
  /api/v1/subscribe:
    post:
      operationId: subscribe
      summary: Create subscription checkout
      description: Create a subscription checkout or billing-management URL only after the user confirms. The request never completes payment by itself.
      tags:
      - Subscribe
      security:
      - apiKey: []
      - oauthBearer: []
      requestBody:
        required: false
        description: Optional subscription tier to pre-select at checkout.
        content:
          application/json:
            schema:
              type: object
              properties:
                tier:
                  type: string
                  enum:
                  - starter
                  - pro
                  - business
                  description: Subscription tier to pre-select.
                  example: pro
            example:
              tier: pro
      responses:
        '200':
          description: Billing URL
          content:
            application/json:
              schema:
                type: object
                required:
                - url
                - status
                - message
                properties:
                  url:
                    type: string
                    format: uri
                    example: https://xquik.com/billing/session
                  status:
                    type: string
                    enum:
                    - checkout_created
                    - already_subscribed
                    - payment_issue
                    example: checkout_created
                  message:
                    type: string
                    example: Billing session created
              example:
                url: https://xquik.com/billing/session
                status: checkout_created
                message: Billing session created
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        default:
          $ref: '#/components/responses/UnexpectedError'
  /api/v1/credits:
    get:
      operationId: getCredits
      summary: Get credits balance
      tags:
      - Subscribe
      security:
      - apiKey: []
      - oauthBearer: []
      responses:
        '200':
          description: Credits balance and usage
          content:
            application/json:
              schema:
                type: object
                required:
                - auto_topup_amount_dollars
                - auto_topup_enabled
                - auto_topup_threshold
                - balance
                - lifetime_purchased
                - lifetime_used
                properties:
                  auto_topup_amount_dollars:
                    type: number
                    description: Configured dollar amount for each automatic top-up.
                    example: 10
                  auto_topup_enabled:
                    type: boolean
                    example: false
                  auto_topup_threshold:
                    type: string
                    description: Credit balance threshold that triggers automatic top-up when enabled, represented as a bigint string.
                    example: '50000'
                  balance:
                    type: string
                    description: Current credit balance as a bigint string to preserve precision above Number.MAX_SAFE_INTEGER.
                    example: '50000'
                  lifetime_purchased:
                    type: string
                    description: Lifetime purchased credits as a bigint string.
                    example: '200000'
                  lifetime_used:
                    type: string
                    description: Lifetime consumed credits as a bigint string.
                    example: '150000'
              example:
                auto_topup_amount_dollars: 10
                auto_topup_enabled: false
                auto_topup_threshold: '50000'
                balance: '50000'
                lifetime_purchased: '200000'
                lifetime_used: '150000'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        default:
          $ref: '#/components/responses/UnexpectedError'
      description: Get credits balance.
  /api/v1/credits/topup:
    post:
      operationId: topUpCredits
      summary: Create credit top-up checkout
      description: Create a hosted checkout only after the user confirms. The request never completes payment or adds credits.
      tags:
      - Subscribe
      security:
      - apiKey: []
      - oauthBearer: []
      requestBody:
        required: true
        description: Confirmed dollar amount for the credit top-up checkout.
        content:
          application/json:
            schema:
              type: object
              required:
              - dollars
              properties:
                dollars:
                  type: integer
                  description: Amount to top up in US dollars. Minimum 10.
                  minimum: 10
                  example: 10
                locale:
                  type: string
                  description: Optional checkout locale. Defaults to en.
                  example: en
            example:
              dollars: 10
      responses:
        '200':
          description: Top-up checkouts
          content:
            application/json:
              schema:
                type: object
                required:
                - url
                - redirect_url
                properties:
                  redirect_url:
                    type: string
                    format: uri
                    description: Stable Xquik redirect URL for the active checkout.
                    example: https://xquik.com/api/v1/credits/topup/redirect?session_id=checkout_example
                  url:
                    type: string
                    format: uri
                    description: 'Same stable Xquik redirect URL as redirect_url. The response never exposes the hosted checkout URL.

                      '
                    example: https://xquik.com/api/v1/credits/topup/redirect?session_id=checkout_example
              example:
                redirect_url: https://xquik.com/api/v1/credits/topup/redirect?session_id=checkout_example
                url: https://xquik.com/api/v1/credits/topup/redirect?session_id=checkout_example
        '400':
          $ref: '#/components/responses/InvalidInput'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        default:
          $ref: '#/components/responses/UnexpectedError'
  /api/v1/credits/topup/status:
    get:
      operationId: getCreditTopupStatus
      summary: Get top-up billing status
      tags:
      - Subscribe
      security:
      - apiKey: []
      - oauthBearer: []
      parameters:
      - name: session_id
        in: query
        required: true
        schema:
          type: string
        description: Top-up session ID to inspect.
      responses:
        '200':
          description: Top-up billing status
          content:
            application/json:
              schema:
                type: object
                required:
                - status
                properties:
                  amount_dollars:
                    anyOf:
                    - type: integer
                      minimum: 10
                    - type: 'null'
                    description: Dollar amount requested for the top-up.
                    example: 25
                  credits:
                    type: string
                    description: Bigint string credit amount granted or pending.
                    example: '166666'
                  status:
                    type: string
                    enum:
                    - paid
                    - processing
                    - failed
                    - expired
                    example: paid
              example:
                amount_dollars: 25
                credits: '166666'
                status: paid
        '400':
          $ref: '#/components/responses/InvalidInput'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        default:
          $ref: '#/components/responses/UnexpectedError'
      description: Get top-up billing status.
  /api/v1/credits/quick-topup:
    post:
      operationId: quickTopUpCredits
      summary: Charge saved card for credits
      tags:
      - Subscribe
      security:
      - cookieSession: []
      requestBody:
        required: true
        description: Dollar amount to charge the saved payment method.
        content:
          application/json:
            schema:
              type: object
              required:
              - dollars
              properties:
                dollars:
                  type: number
                  description: Dollar amount for the top-up
                  minimum: 10
                  maximum: 500
                  example: 25
            example:
              dollars: 25
      responses:
        '200':
          description: Quick top-up result
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  required:
                  - outcome
                  - balance
                  - credits
                  properties:
                    outcome:
                      type: string
                      const: charged
                    balance:
                      type: string
                      description: Updated credit balance as a bigint string.
                      example: '1450'
                    credits:
                      type: string
                      description: Credits added by this top-up as a bigint string.
                      example: '1000'
                - type: object
                  required:
                  - outcome
                  - clientSecret
                  properties:
                    outcome:
                      type: string
                      const: requires_action
                    clientSecret:
                      type: string
                      description: Payment client secret for completing authentication.
                      example: pi_3abc_secret_xyz
                - type: object
                  required:
                  - outcome
                  properties:
                    outcome:
                      type: string
                      const: no_payment_method
              examples:
                charged:
                  summary: Payment succeeded
                  value:
                    outcome: charged
                    balance: '1450'
                    credits: '1000'
                requiresAction:
                  summary: Additional authentication required
                  value:
                    outcome: requires_action
                    clientSecret: pi_3abc_secret_xyz
                noPaymentMethod:
                  summary: No saved payment method
                  value:
                    outcome: no_payment_method
        '400':
          $ref: '#/components/responses/InvalidInput'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        default:
          $ref: '#/components/responses/UnexpectedError'
      description: Charge saved card for credits.
components:
  responses:
    InvalidInput:
      description: Invalid input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: invalid_input
            message: Invalid input. Check the request body.
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: not_found
            message: Resource not found.
    Unauthenticated:
      description: Unauthenticated
      headers:
        Cache-Control:
          description: Prevents storage of authentication responses.
          schema:
            type: string
            const: no-store
        WWW-Authenticate:
          description: Bearer authentication challenge.
          schema:
            type: string
            const: Bearer realm="xquik"
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthenticated
            message: Authentication required. Provide a valid API key or bearer token.
    UnexpectedError:
      content:
        application/json:
          example:
            error: internal_error
            message: Unexpected error. Try again.
          schema:
            $ref: '#/components/schemas/Error'
      description: Unexpected error.
    RateLimitExceeded:
      description: 'Xquik tier rate limit exceeded. The response includes a `Retry-After` header with the number of seconds to wait before retrying.

        '
      content:
        application/json:
          schema:
            allOf:
            - $ref: '#/components/schemas/Error'
            - type: object
              properties:
                retryAfter:
                  type: integer
                  example: 60
          example:
            error: rate_limit_exceeded
            message: Too many requests. Try again later.
            retryAfter: 60
      headers:
        Retry-After:
          description: Seconds until the next permitted request.
          schema:
            example: 60
            minimum: 1
            type: integer
  schemas:
    Error:
      description: 'Error response. Default v1 returns a legacy string error code. Send `xquik-api-contract: 2026-04-29` to receive the structured best-practice error object.

        '
      type: object
      required:
      - error
      properties:
        error:
          x-stainless-naming:
            python:
              type_name: ErrorValue
            java:
              type_name: ErrorValue
          oneOf:
          - type: string
            title: LegacyErrorCode
            enum:
            - internal_error
            - account_already_connected
            - account_needs_reauth
            - account_not_found
            - account_required
            - account_restricted
            - api_key_limit_reached
            - article_not_found
            - closed
            - dm_not_permitted
            - invalid_format
            - invalid_id
            - invalid_input
            - invalid_params
            - invalid_tool_type
            - invalid_tweet_id
            - invalid_tweet_url
            - invalid_user_id
            - invalid_user_ids
            - invalid_username
            - invalid_json
            - insufficient_credits
            - login_cooldown
            - login_failed
            - media_download_failed
            - missing_params
            - missing_query
            - monitor_already_exists
            - monitor_profile_unavailable
            - no_media
            - no_credits
            - no_subscription
            - not_found
            - payment_failed
            - rate_limit_exceeded
            - service_unavailable
            - style_not_found
            - subscription_inactive
            - tweet_not_found
            - unauthenticated
            - unsupported_field
            - user_not_found
            - body_too_large
            - checkout_unavailable
            - connection_challenge_expired
            - connection_challenge_inactive
            - coverage_cursor_gone
            - coverage_cursor_unavailable
            - draft_not_found
            - expired
            - favoriters_unavailable
            - forbidden
            - guest_wallet_unavailable
            - guest_wallets_disabled
            - guest_wallets_unavailable
            - idempotency_conflict
            - idempotency_key_conflict
            - invalid_community_id
            - invalid_complete_replies_request
            - invalid_coverage_cursor
            - invalid_coverage_request
            - invalid_idempotency_key
            - invalid_list_id
            - invalid_output_options
            - invalid_payment_amount
            - invalid_range
            - invalid_reply_options
            - login_rate_limited
            - login_service_unavailable
            - missing_idempotency_key
            - missing_ids
            - missing_url
            - no_cached_style
            - passkey_required
            - rate_limited
            - read_request_timeout
            - replies_incomplete
            - support_media_rate_limit
            - support_request_rate_limit
            - too_many_ids
            - too_many_tweets
            - unknown_field
            - unsupported_media_type
            - webhook_inactive
            - write_tracking_unavailable
            - x_write_unconfirmed
            - x_account_feature_required
            - x_account_protected
            - x_account_suspended
            - x_api_rate_limited
            - x_api_unavailable
            - x_api_unauthorized
            - x_auth_failure
            - x_content_too_long
            - x_daily_limit
            - x_dm_not_allowed
            - x_duplicate_action
            - x_login_auth_failed
            - x_login_challenge
            - x_login_denied
            - x_login_failed
            - x_login_proxy_error
            - x_login_rate_limited
            - x_login_service_unavailable
            - x_login_suspended
            - x_rate_limited
            - x_rejected
            - x_target_not_found
            - x_transient_error
            - x_user_lookup_failed
            - x_write_ambiguous
            - x_write_failed
          - type: object
            title: StructuredError
            required:
            - message
            - type
            - code
            properties:
              message:
                type: string
              type:
                type: string
                enum:
                - api_error
                - authentication_error
                - billing_error
                - dependency_error
                - invalid_request_error
                - permission_error
                - rate_limit_error
              code:
                type: string
                title: ErrorCode
                enum:
                - internal_error
                - account_already_connected
                - account_needs_reauth
                - account_not_found
                - account_required
                - account_restricted
                - api_key_limit_reached
                - article_not_found
                - closed
                - dm_not_permitted
                - invalid_format
                - invalid_id
                - invalid_input
                - invalid_params
                - invalid_tool_type
                - invalid_tweet_id
                - invalid_tweet_url
                - invalid_user_id
                - invalid_user_ids
                - invalid_username
                - invalid_json
                - insufficient_credits
                - login_cooldown
                - login_failed
                - media_download_failed
                - missing_params
                - missing_query
                - monitor_already_exists
                - monitor_profile_unavailable
                - no_media
                - no_credits
                - no_subscription
                - not_found
                - payment_failed
                - rate_limit_exceeded
                - service_unavailable
                - style_not_found
                - subscription_inactive
                - tweet_not_found
                - unauthenticated
                - unsupported_field
                - user_not_found
                - body_too_large
                - checkout_unavailable
                - connection_challenge_expired
                - connection_challenge_inactive
                - coverage_cursor_gone
                - coverage_cursor_unavailable
                - draft_not_found
                - expired
                - favoriters_unavailable
                - forbidden
                - guest_wallet_unavailable
                - guest_wallets_disabled
                - guest_wallets_unavailable
                - idempotency_conflict
                - idempotency_key_conflict
                - invalid_community_id
                - invalid_complete_replies_request
                - invalid_coverage_cursor
                - invalid_coverage_request
                - invalid_idempotency_key
                - invalid_list_id
                - invalid_output_options
                - invalid_payment_amount
                - invalid_range
                - invalid_reply_options
                - login_rate_limited
                - login_service_unavailable
                - missing_idempotency_key
                - missing_ids
                - missing_url
                - no_cached_style
                - passkey_required
                - rate_limited
                - read_request_timeout
                - replies_incomplete
                - support_media_rate_limit
                - support_request_rate_limit
                - too_many_ids
                - too_many_tweets
                - unknown_field
                - unsupported_media_type
                - webhook_inactive
                - write_tracking_unavailable
                - x_write_unconfirmed
                - x_account_feature_required
                - x_account_protected
                - x_account_suspended
                - x_api_rate_limited
                - x_api_unavailable
                - x_api_unauthorized
                - x_auth_failure
                - x_content_too_long
                - x_daily_limit
                - x_dm_not_allowed
                - x_duplicate_action
                - x_login_auth_failed
                - x_login_challenge
                - x_login_denied
                - x_login_failed
                - x_login_proxy_error
                - x_login_rate_limited
                - x_login_service_unavailable
                - x_login_suspended
                - x_rate_limited
                - x_rejected
                - x_target_not_found
                - x_transient_error
                - x_user_lookup_failed
                - x_write_ambiguous
                - x_write_failed
        message:
          type: string
          description: Human-readable error guidance.
        reason:
          type: string
          description: Machine-readable reason for a login cooldown.
        retryAfter:
          type: integer
          minimum: 1
          description: Seconds until the next permitted request.
        retryAfterMs:
          type: integer
          minimum: 1
          description: Required wait in milliseconds.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Xquik API key passed through the x-api-key header. Xquik-Api-Key is a vendor-prefixed alias. API keys beginning with xq_ can also use Authorization: Bearer.'
    oauthBearer:
      type: http
      scheme: bearer
      description: 'OAuth 2.1 access token passed through Authorization: Bearer. Values beginning with xq_ remain Xquik API-key credentials, not OAuth tokens.'
    cookieSession:
      type: apiKey
      in: cookie
      name: __Host-xquik_session
      description: Secure Xquik browser session cookie.
x-service-info:
  categories:
  - data
  docs:
    homepage: https://xquik.com
    apiReference: https://docs.xquik.com
    llms: https://docs.xquik.com/llms.txt
x-discovery:
  ownershipProofs:
  - dns:xquik.com