# Upstage: Solar Pro 4 Contributor on AICredits

Guide for calling `upstage/solar-pro-4-contributor` through the AICredits API. Paste it into a coding agent to add this model to a project.

Solar Pro 4 Contributor is the same Solar Pro 4 model from Upstage, offered at a lower rate in exchange for allowing Upstage to use interaction data to improve its models. It has a 524K context window and is built for long-horizon tasks and agentic workflows, with strong capabilities in office productivity, document-intensive work, and coding.

Prompts and completions sent to this model may be used by Upstage to improve its models.

For the standard version that doesn't allow training on your data, see [Solar Pro 4](/upstage/solar-pro4).

## Model

- Model ID: `upstage/solar-pro-4-contributor`
- Type: chat
- Context window: 524K tokens
- Input: text
- Output: text

## Pricing

- ₹8.79 per 1M input tokens
- ₹35.14 per 1M output tokens
- ₹1.76 per 1M cached input tokens

Prices are in Indian rupees and are deducted from your prepaid wallet. They follow the live USD/INR rate, so read the current figure from `GET https://api.aicredits.in/v1/models` or https://aicredits.in/models/upstage/solar-pro-4-contributor.

## Authentication

Create an API key (it starts with `sk-`) in Dashboard → API Keys, then send it as a bearer token:

```text
Authorization: Bearer $AICREDITS_API_KEY
```

## API

### Chat Completions API (OpenAI format)

POST https://api.aicredits.in/v1/chat/completions

```python
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AICREDITS_API_KEY"],
    base_url="https://api.aicredits.in/v1",
)

response = client.chat.completions.create(
    model="upstage/solar-pro-4-contributor",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
```

```typescript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.AICREDITS_API_KEY,
  baseURL: "https://api.aicredits.in/v1",
});

const response = await client.chat.completions.create({
  model: "upstage/solar-pro-4-contributor",
  messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);
```

```bash
curl https://api.aicredits.in/v1/chat/completions \
  -H "Authorization: Bearer $AICREDITS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "upstage/solar-pro-4-contributor",
    "messages": [{ "role": "user", "content": "Hello!" }]
  }'
```

### Messages API (Anthropic format)

POST https://api.aicredits.in/v1/messages. The Anthropic SDK adds `/v1/messages` itself, so its base URL has no `/v1`.

```python
import os
import anthropic

client = anthropic.Anthropic(
    api_key=os.environ["AICREDITS_API_KEY"],
    base_url="https://api.aicredits.in",
)

message = client.messages.create(
    model="upstage/solar-pro-4-contributor",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}],
)
print(message.content)
```

### Responses API (OpenAI format)

POST https://api.aicredits.in/v1/responses

```bash
curl https://api.aicredits.in/v1/responses \
  -H "Authorization: Bearer $AICREDITS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "upstage/solar-pro-4-contributor",
    "input": "Hello!"
  }'
```

## Errors

| Status | Message contains | What to do |
|---|---|---|
| 401 | `Invalid API Key` | The key is wrong, revoked or from another provider. Use an AICredits key (it starts with sk-) from Dashboard → API Keys. |
| 402 | `API Key Budget Exceeded` | This key has used its budget. Raise the budget in Dashboard → API Keys, or use another key. |
| 402 | `Insufficient Balance` | The wallet cannot cover the request. Top up in Dashboard → Billing. |
| 404 | `Unknown endpoint: POST /v1/v1/…` | The base URL is wrong, most often /v1 typed twice. OpenAI-format clients use https://api.aicredits.in/v1; Anthropic-format clients use https://api.aicredits.in. |
| 404 | `Model '…' is not available` | The model ID is not in the catalog. IDs are written provider/model; copy one from the models page or GET /v1/models. |

Provider errors, timeouts and empty replies are not billed. Which failed or cancelled calls are billed: https://aicredits.in/docs/troubleshooting/failed-calls-and-billing

## More

- Model page: https://aicredits.in/models/upstage/solar-pro-4-contributor
- All docs: https://aicredits.in/docs
- Index for agents: https://aicredits.in/llms.txt
