Обмін коїнів на кредити
curl --request POST \
--url https://api.erlcrussia.com/v3/ai/credits/exchange \
--header 'Content-Type: application/json' \
--cookie erlc_auth= \
--data '{
"coins": 100
}'import requests
url = "https://api.erlcrussia.com/v3/ai/credits/exchange"
payload = { "coins": 100 }
headers = {
"cookie": "erlc_auth=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'erlc_auth=', 'Content-Type': 'application/json'},
body: JSON.stringify({coins: 100})
};
fetch('https://api.erlcrussia.com/v3/ai/credits/exchange', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.erlcrussia.com/v3/ai/credits/exchange",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'coins' => 100
]),
CURLOPT_COOKIE => "erlc_auth=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.erlcrussia.com/v3/ai/credits/exchange"
payload := strings.NewReader("{\n \"coins\": 100\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "erlc_auth=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.erlcrussia.com/v3/ai/credits/exchange")
.header("cookie", "erlc_auth=")
.header("Content-Type", "application/json")
.body("{\n \"coins\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erlcrussia.com/v3/ai/credits/exchange")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'erlc_auth='
request["Content-Type"] = 'application/json'
request.body = "{\n \"coins\": 100\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"exchanged_coins": 100,
"credits_added": 100,
"new_credits": 252.4,
"remaining_coins": 150
}AI Studio
Обмін коїнів на кредити
Обмінює ваші коїни на AI-кредити за курсом 1:1.
POST
/
ai
/
credits
/
exchange
Обмін коїнів на кредити
curl --request POST \
--url https://api.erlcrussia.com/v3/ai/credits/exchange \
--header 'Content-Type: application/json' \
--cookie erlc_auth= \
--data '{
"coins": 100
}'import requests
url = "https://api.erlcrussia.com/v3/ai/credits/exchange"
payload = { "coins": 100 }
headers = {
"cookie": "erlc_auth=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'erlc_auth=', 'Content-Type': 'application/json'},
body: JSON.stringify({coins: 100})
};
fetch('https://api.erlcrussia.com/v3/ai/credits/exchange', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.erlcrussia.com/v3/ai/credits/exchange",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'coins' => 100
]),
CURLOPT_COOKIE => "erlc_auth=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.erlcrussia.com/v3/ai/credits/exchange"
payload := strings.NewReader("{\n \"coins\": 100\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "erlc_auth=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.erlcrussia.com/v3/ai/credits/exchange")
.header("cookie", "erlc_auth=")
.header("Content-Type", "application/json")
.body("{\n \"coins\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.erlcrussia.com/v3/ai/credits/exchange")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'erlc_auth='
request["Content-Type"] = 'application/json'
request.body = "{\n \"coins\": 100\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"exchanged_coins": 100,
"credits_added": 100,
"new_credits": 252.4,
"remaining_coins": 150
}Авторизації
Сесійна HTTP-Only кука авторизації на порталі.
Тіло
application/json
Необхідний діапазон:
x >= 1Чи була ця сторінка корисною?