Claude / Anthropic
Claude / Anthropic is an official direct-forward route compatible with the official Anthropic Messages API. Responses are returned in the official API shape.
Pricing
Per-token billing:
| Model | Input | Cache read | Cache write 5m | Cache write 1h | Output |
|---|---|---|---|---|---|
claude-haiku-4-5/anthropic | 295 credits | 30 credits | 368 credits | 589 credits | 1471 credits |
claude-opus-4-5/anthropic | 1471 credits | 148 credits | 1839 credits | 2942 credits | 7353 credits |
claude-sonnet-4-5/anthropic | 883 credits | 89 credits | 1103 credits | 1765 credits | 4412 credits |
claude-opus-4-6/anthropic | 1471 credits | 148 credits | 1839 credits | 2942 credits | 7353 credits |
claude-sonnet-4-6/anthropic | 883 credits | 89 credits | 1103 credits | 1765 credits | 4412 credits |
claude-opus-4-7/anthropic | 1471 credits | 148 credits | 1839 credits | 2942 credits | 7353 credits |
All prices are per 1M tokens. Platform conversion: 1 credit = $0.005.
Endpoint
POST https://api.aivideoapi.ai/v1/messages
Compatible with the official Anthropic Messages API. Use your API Market key with this platform endpoint.
Create Message
curl -X POST https://api.aivideoapi.ai/v1/messages \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-6/anthropic",
"max_tokens": 4096,
"messages": [
{ "role": "user", "content": "Explain quantum computing in simple terms" }
],
"stream": false
}'
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model name |
messages | array | Yes | Conversation messages |
max_tokens | integer | No | Maximum output tokens |
stream | boolean | No | Enable streaming |
tools | array | No | Anthropic tool definitions |
thinking | object | No | Anthropic extended thinking config |
Response
The response is returned in the official Anthropic Messages API shape.
Error Codes
When a request fails, the API returns a JSON error response:
{
"error": {
"code": "insufficient_credits",
"message": "Your credit balance is too low. Please top up.",
"type": "billing_error"
}
}
Error Reference
| HTTP Status | Code | Type | Description |
|---|---|---|---|
| 400 | invalid_request | invalid_request_error | Missing or invalid parameters |
| 401 | invalid_api_key | authentication_error | API key is invalid, disabled, or deleted |
| 402 | insufficient_credits | billing_error | Credit balance too low, please top up |
| 403 | ip_not_allowed | permission_error | Request IP not in the key's allowlist |
| 404 | model_not_found | invalid_request_error | Model does not exist or is inactive |
| 404 | task_not_found | invalid_request_error | Task ID does not exist |
| 429 | rate_limit_exceeded | rate_limit_error | Too many requests, please slow down |
| 429 | spend_limit_exceeded | billing_error | Key spend limit reached (hourly/daily/total) |
| 500 | internal_error | api_error | Unexpected server error |
| 503 | upstream_error | upstream_error | Upstream AI provider returned an error |
Common Scenarios
invalid_request (400)
Returned when required fields are missing or invalid.
{
"error": {
"code": "invalid_request",
"message": "'model' is required.",
"type": "invalid_request_error"
}
}
insufficient_credits (402)
Your balance is too low. Check your balance with GET /v1/credits and top up in Dashboard > Billing.
invalid_api_key (401)
Possible causes:
- The key does not start with
sk- - The key has been disabled or deleted
- The user account has been banned
upstream_error (503)
The upstream AI provider returned an error. This may happen when:
- The input contains sensitive or prohibited content
- The provider is temporarily unavailable
- The request parameters are not supported by the provider
Credits are automatically refunded when a task fails due to upstream errors.