PR-CY API — OpenAI-compatible gateway

/v1/chat/completions over api.pr-cy.ru. Access ships with any paid PR-CY plan: pay in rubles, no foreign cards or VPN, credits are shared across the API and SEO tools.

How to get started

Already on a paid PR-CY plan

Your plan unlocks both the API and SEO tools — they share the same credits balance. The key was created with your account; pick it up in API Settings.

New here

Sign-up is free. API access requires any paid PR-CY plan, payable in rubles without foreign cards or VPN. Credits are shared across the API and SEO tools.

Three steps

If you've used the OpenAI API, the switch takes one line. No new library to install.

1. Grab your API key

Open API Settings in your PR-CY dashboard — the key was created with the account. Just copy it: you send requests, we charge credits.

2. Set base_url

Replace the OpenAI URL with https://api.pr-cy.ru/v1. The key goes in the Authorization: Bearer header.

3. Send the request

POST to /chat/completions with the model and messages fields. If model is omitted, prcy-5.4-mini is used.

Request example

Compose the request in the form — cURL / Python / Node.js code updates automatically. Paid users can hit Send and get a real response below.

updates from the form above
curl https://api.pr-cy.ru/v1/chat/completions \
  -H "Authorization: Bearer $PRCY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "prcy-5.4-mini",
  "max_tokens": 400,
  "messages": [
    {
      "role": "system",
      "content": "You are a PR-CY SEO copywriter."
    },
    {
      "role": "user",
      "content": "Write an SEO title and description for a corner sofas page."
    }
  ]
}'

Response

A standard OpenAI chat.completion object — parses with the same libraries. Example response below.

{
  "id": "chatcmpl-7Qb3f1...",
  "object": "chat.completion",
  "model": "prcy-4o-mini",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Title: Corner sofas — buy affordably with delivery..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 48,
    "completion_tokens": 126,
    "total_tokens": 174
  }
}

Models and credit cost

Pass the identifier in the model field. The gateway currently accepts only GPT-family models. Input — credits per 1000 prompt characters; output — credits per 1000 response tokens.

prcy-4o-minifast
Default basic model: fast, supports images, minimum credits per request.
Context (chars)
128K
Input / 1K chars
0.5
Output / 1K tokens
1
Images
yes
prcy-5.4-minifast
GPT-5.4 mini: cheaper than the flagship, good for high-volume work.
Context (chars)
200K
Input / 1K chars
0.4
Output / 1K tokens
1
Images
yes
prcy-5.5flagship
Flagship: complex copy, reasoning, long briefs. Available on plans with advanced models.
Context (chars)
200K
Input / 1K chars
2
Output / 1K tokens
10
Images
yes
Model
Context (chars)
Max output (tokens)
Input / 1K chars
Output / 1K tokens
Images
prcy-5.4-nanofast200K32K0.10.5yes
prcy-5.4-minifast200K32K0.41yes
prcy-4o-minifast128K16.4K0.51yes
prcy-5.5flagship200K32K210yes
prcy-5.4flagship200K32K15yes

Hook it into IDEs and agents

The API is OpenAI-compatible — any client that takes base_url + api_key connects in two lines. Pick a tool, copy the config and drop in your key.

~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "prcy": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "PR-CY",
      "options": {
        "baseURL": "https://api.pr-cy.ru/v1",
        "apiKey": "<PRCY_API_KEY>"
      },
      "models": {
        "prcy-4o-mini":  { "name": "PR-CY 4o mini" },
        "prcy-5.4-mini": { "name": "PR-CY 5.4 mini" },
        "prcy-5.5":      { "name": "PR-CY 5.5" }
      }
    }
  }
}

How credits are charged

A single credits balance on your PR-CY plan, for both the API and the SEO tools. Estimate the charge right here.

Prompt = the whole history, not just the last message
All elements of messages are counted: system + the entire conversation. If the total length exceeds the model's context, the overflow is trimmed from the top and isn't billed.
Input in characters — no tokenizer needed
We measure the prompt length with mb_strlen, not in tokens. You can estimate the cost up front without shipping a tokenizer in your code.
Images — billed separately
For vision models, each image_url adds credits on top of the text, by resolution: ⌈width / 512⌉ × ⌈height / 512⌉ × 170 tokens per image.
Two-phase charging
At launch we reserve the prompt cost + 1000 response tokens. After generation we top up if the actual completion_tokens exceeds that. Visible in usage on every response.

Charge calculator

Estimate based on the model's price. Illustrative values.

Input characters (prompt)8K
Output tokens (response)2K
5.20 credits per request
input 0.4 per 1K chars · output 1 per 1K tokens · 1 credit ≈ 0.5 ₽

Error codes

Format compatible with OpenAI: HTTP status + JSON with an error.message field.

CodeTypeWhat it meansWhat to do
401request errorInvalid keyCheck the Authorization: Bearer &lt;key&gt; header. No spaces or line breaks.
402config or limitNot enough creditsCredits depleted or the model isn't available on your plan. Top up or pick a smaller model.
404config or limitModel not foundThe model field contains an unknown identifier. Check the table above or call /v1/models.
422request errorInvalid requestMissing messages or malformed body. Verify the JSON and Content-Type: application/json header.
429config or limitRate limitToo many requests or credits exhausted on your plan. Back off and retry.
5xxtransientUpstream errorTransient issue at the model provider. Retry with exponential backoff.

FAQ

Is this really compatible with the OpenAI SDK?
Yes. The /v1/chat/completions endpoint mirrors the OpenAI schema: same model, messages, stream, temperature fields. Swap base_url for https://api.pr-cy.ru/v1, plug in the key — the rest of your code stays the same.
Which model runs if I don't specify model?
By default the request goes to prcy-4o-mini — fast and cheap. To pick another, pass its identifier in the model field.
How exactly are credits charged?
From the unified account balance. Input is measured in characters of the prompt (including the system message), output — in tokens of the response. Formula: credits = input × ⌈prompt_chars / 1000⌉ + output × ⌈completion_tokens / 1000⌉. Rounded up, minimum 1 input unit. The actual volume comes back in the usage field on every response. 1 credit ≈ 0.5 ₽ — exact price depends on the plan.
Which model has the lowest charge?
The cheapest are the nano- and mini-versions: prcy-5.4-nano, prcy-4o-mini, prcy-5.4-mini. Flagships prcy-5.5 and prcy-5.4 cost more but handle complex tasks better.
Are streaming and images supported?
Streaming via "stream": true (Server-Sent Events). Models marked Yes in the Images column accept images — as image_url blocks in content, just like OpenAI vision.
Will other models be available — Claude, Gemini, DeepSeek?
Yes, we're testing. The gateway currently routes only the GPT family; the rest we use in internal tools (chat, AI tools). As we verify compatibility with the OpenAI schema, we'll open them through the same /v1/chat/completions. Identifiers and prices will land in the table above.
Where do I get the API key?
In your PR-CY dashboard, under API Settings. The key was created with your account — just copy it. Keep it in an environment variable, don't publish it in client-side code.
Do I need a separate plan for the API?
No. The API uses the same credits balance as the SEO tools. Buy any PR-CY plan — both the API and the tools work off the same balance.

🍪 By using this website, you agree to the processing of cookies and collection of technical data to improve website performance in accordance with our privacy policy.