Skip to main content
AI tutorials

How to Access Multiple Frontier and Uncensored AI Models with 7API

Learn how to configure 7API, make requests with the OpenAI and Anthropic SDKs or cURL, select current model IDs, connect compatible developer tools, manage usage, and evaluate uncensored or abliterated model variants responsibly.

How to Access Multiple Frontier and Uncensored AI Models with 7API

What 7API Does

7API is an API gateway that provides access to multiple AI model families through one API key, one balance, and a pay-per-token billing model. It supports OpenAI- and Anthropic-compatible interfaces, allowing existing applications to switch providers by changing the API key, base URL, and model ID.

The available families include Claude, GPT, Gemini, Grok, DeepSeek, GLM, and Kimi. Standard models are offered alongside select uncensored and abliterated variants where available. 7API is the gateway rather than the owner of these models, so model behavior, terms, identifiers, pricing, and availability can vary by underlying provider.

Important: An uncensored model is designed to refuse fewer requests than a standard model, but this is not a guarantee that it will never refuse. Applications still require evaluation, appropriate guardrails, human review, and compliance with provider terms and applicable laws.

Key Features

  • One API key: Use one account to access supported models across seven major model families.
  • OpenAI compatibility: Connect clients that support a custom OpenAI base_url.
  • Anthropic compatibility: Use the Anthropic-style endpoint with the Anthropic SDK and compatible tools such as Claude Code.
  • Uncensored options: Select uncensored and abliterated variants when they are available in the live catalog.
  • Pay-per-token billing: There is no subscription, monthly minimum, or seat fee.
  • Prompt caching: Repeated prefixes can be charged at a lower cached-input rate.
  • Subkeys: Separate funding and usage for teammates, clients, or projects.
  • Compatible tooling: Use Cursor, Codex CLI, OpenCode, LangChain, LlamaIndex, and other clients that accept OpenAI- or Anthropic-compatible providers.

Before You Begin

Create an account through the 7API website. The dashboard supplies an API key beginning with sk-, the correct base URL, current model IDs, context limits, live availability, and pricing.

Do not copy a base URL or model ID from an old example into production without checking the dashboard. Providers can release new versions, and model identifiers or uncensored variants may rotate.

Install an SDK

For Python, install the SDK that matches the interface you plan to use. You only need the OpenAI package for the OpenAI-compatible example or the Anthropic package for the Anthropic-compatible example.

pip install openai
pip install anthropic

Configure Environment Variables

Store credentials outside your source code. Copy the exact base URL from the dashboard and export it with your key:

export SEVEN_API_KEY="sk-..."
export SEVEN_API_BASE_URL="https://.../v1"

Avoid committing real API keys to a repository. Server-side environment variables or a secrets manager are preferable to hard-coded credentials.

Make an OpenAI-Compatible Request

The OpenAI-compatible interface is useful when an application already uses the OpenAI SDK or another client that permits a custom base URL.

  1. Import OpenAI and read the credentials from the environment.
  2. Initialize the client with the 7API key and base URL.
  3. Replace MODEL_ID with a current identifier from the dashboard.
  4. Send a chat completion and read the returned assistant message.
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["SEVEN_API_KEY"],
    base_url=os.environ["SEVEN_API_BASE_URL"],
)

response = client.chat.completions.create(
    model="MODEL_ID",
    messages=[
        {
            "role": "system",
            "content": "You are a precise, helpful assistant."
        },
        {
            "role": "user",
            "content": "Explain the trade-offs of model routing in two paragraphs."
        },
    ],
)

print(response.choices[0].message.content)

This integration pattern can also be used by many OpenAI-compatible applications. In a typical existing configuration, the primary changes are the base URL, API key, and selected model ID.

Make an Anthropic-Compatible Request

Use the Anthropic-compatible interface when your application expects the Anthropic Messages API. The dashboard may show a dedicated Anthropic base URL, so use that exact endpoint rather than assuming it is identical to the OpenAI-compatible URL.

import os
from anthropic import Anthropic

client = Anthropic(
    api_key=os.environ["SEVEN_API_KEY"],
    base_url=os.environ["SEVEN_API_BASE_URL"],
)

message = client.messages.create(
    model="MODEL_ID",
    max_tokens=1024,
    messages=[
        {
            "role": "user",
            "content": "Write a concise release note for a developer tool."
        }
    ],
)

print(message.content[0].text)

Replace MODEL_ID with a currently available model. The response is read from message.content[0].text in this example.

Test the API with cURL

Before integrating an SDK, a direct HTTP request can verify the key, base URL, model ID, and account configuration.

curl "$SEVEN_API_BASE_URL/chat/completions" \
  -H "Authorization: Bearer $SEVEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MODEL_ID",
    "messages": [
      {
        "role": "user",
        "content": "Hello from the 7API quickstart."
      }
    ]
  }'

If the request fails, first confirm that the environment variables are set, the endpoint matches the selected compatibility mode, and the model ID appears in the current dashboard catalog.

Choose a Model Family

Model choice should follow the workload rather than the uncensored label alone. The README identifies several common areas for each family:

  • Claude: Long-form reasoning, writing, and coding agents.
  • GPT: General assistants, tool use, and structured output.
  • Gemini: Multimodal workflows, research, and long-context tasks.
  • Grok: Real-time-style answers and ideation.
  • DeepSeek: Coding, reasoning, and cost-efficient agents.
  • GLM: Agents, coding, and bilingual work.
  • Kimi: Long-document reading and agent workflows.

Not every model in these families is uncensored. Check the live catalog to distinguish standard models from select uncensored or abliterated variants. Test the exact version you intend to deploy because behavior can change between releases.

Connect Existing Developer Tools

7API can be used with tools that accept a custom compatible provider. The required setup depends on the interface expected by the client:

  • Claude Code: Point its Anthropic base URL configuration to the Anthropic-compatible 7API endpoint.
  • Cursor: Add 7API as a custom OpenAI-compatible provider.
  • Codex CLI: Configure an OpenAI-compatible provider profile.
  • OpenCode: Add a custom provider and a valid model ID.
  • LangChain or LlamaIndex: Use the OpenAI-compatible adapter with the 7API base URL and key.
  • Other compatible applications: Replace the provider base URL and API key, then select a supported model ID.

Consult the repository's client-specific documentation when a tool uses different environment variable names or configuration files.

Advanced Usage Tips

Compare Models with the Same Prompt

Because multiple families are available through one gateway, you can send a consistent evaluation prompt to several model IDs without rebuilding the entire integration. Compare output quality, refusal behavior, cost, latency, and reliability before choosing a production model.

Plan for Model Changes

Do not assume a model ID or behavior will remain unchanged indefinitely. Availability can rotate as providers update their catalogs. Keep model selection configurable, confirm current IDs in the dashboard, and reevaluate important prompts after upstream version changes.

Use Prompt Caching Where Appropriate

Applications that repeatedly send the same prompt prefix may benefit from the lower cached-input rate. Review the live pricing information before estimating savings because provider rates can change.

Separate Projects with Subkeys

Use subkeys when a teammate, client, or project should be funded separately from the main balance. This makes centralized access easier while keeping usage boundaries clearer.

Route by Workload

A single gateway makes it practical to choose different model families for different tasks. For example, an application can evaluate one family for long documents and another for coding or structured output. Routing decisions should be based on measured results with current model versions.

Add Application-Level Safeguards

Reduced refusal behavior does not remove the need for controls. Validate model output, restrict sensitive tool access, log appropriate operational data, apply human review to consequential workflows, and follow the terms of the underlying provider.

Pricing and Account Considerations

7API uses pay-per-token billing rather than a subscription. Users top up a shared balance and spend it across supported models. BTC, ETH, USDT, and LTC are listed as supported top-up options. Live prices may change when providers update their rates, so use the dashboard rather than static estimates for budgeting.

The service also lists a referral program that pays 15% of deposits made by referrals. This is separate from API operation and is not required to use the gateway.

Common Limitations

  • No provider can guarantee that an uncensored or abliterated model will never refuse a request.
  • Behavior depends on the model, version, prompt, and provider policy.
  • Model IDs, pricing, and availability can change.
  • Provider terms continue to apply through the gateway.
  • Developers remain responsible for lawful and ethical use, evaluation, guardrails, and human oversight.

Conclusion

7API offers a unified way to evaluate and call Claude, GPT, Gemini, Grok, DeepSeek, GLM, and Kimi models through OpenAI- and Anthropic-compatible interfaces. Start by obtaining the dashboard credentials, test a current model ID with cURL, and then integrate the appropriate SDK or developer tool. Before production deployment, compare exact model versions, monitor pricing and availability, and apply safeguards suited to your application.