curl --request GET \
--url https://api.valar.space/operations/spacecraft/{spacecraftId}/tle \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.valar.space/operations/spacecraft/{spacecraftId}/tle"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.valar.space/operations/spacecraft/{spacecraftId}/tle', 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.valar.space/operations/spacecraft/{spacecraftId}/tle",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.valar.space/operations/spacecraft/{spacecraftId}/tle"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.valar.space/operations/spacecraft/{spacecraftId}/tle")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valar.space/operations/spacecraft/{spacecraftId}/tle")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"timestamp": "2026-09-22T12:00:00Z",
"status": 400,
"error": "VALIDATION_ERROR",
"message": "Required parameter 'epoch' of type 'Instant' is missing",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}{
"timestamp": "2026-09-22T12:00:00Z",
"status": 401,
"error": "Unauthorized",
"message": "Invalid API key",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}{
"timestamp": "2026-09-22T12:00:00Z",
"status": 403,
"error": "ACCESS_ERROR",
"message": "Access denied",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}{
"timestamp": "2026-09-22T12:00:00Z",
"status": 404,
"error": "SC-4040",
"message": "Spacecraft with identifier '550e8400-e29b-41d4-a716-446655440000' not found",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}{
"timestamp": "2026-09-22T12:00:00Z",
"status": 406,
"error": "Not Acceptable",
"message": "Accept header is malformed or does not allow a supported response media type",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}{
"timestamp": "2026-09-22T12:00:00Z",
"status": 422,
"error": "COMPUTE_STATE_INSIDE_ELLIPSOID",
"message": "The requested computation resolved a state vector inside the Earth ellipsoid (sub-surface). Verify the spacecraft's state vector, or shorten the propagation window.",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}{
"timestamp": "2026-09-22T12:00:00Z",
"status": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}Generate a fitted TLE
Returns an own-computed TLE at the explicit requested epoch. Uses the latest eligible stored state by epoch: manual/imported states or accepted converged orbit solutions. Propagates with the existing accurate force model and applicable maneuvers, then fits a single-state TLE. This does not retrieve provider TLEs, select a historical state, persist a resource, or start a background job. Required spacecraft force-model configuration must be present. Assigned numeric catalogue IDs through 339999 can be serialized (Alpha-5 above 99999); larger IDs are rejected, never truncated. A missing NORAD ID retains the generator’s 99999 placeholder. Requires a valid API key with read:ephemeris permission and access to the spacecraft. Success is text/plain only; an unsupported or malformed Accept header returns 406. Request and generation failures use JSON error envelopes even when Accept is text/plain. Missing credentials or malformed bearer tokens may instead receive an empty 401 with WWW-Authenticate: Bearer. No receiver compatibility or orbit accuracy guarantee is implied.
curl --request GET \
--url https://api.valar.space/operations/spacecraft/{spacecraftId}/tle \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.valar.space/operations/spacecraft/{spacecraftId}/tle"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.valar.space/operations/spacecraft/{spacecraftId}/tle', 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.valar.space/operations/spacecraft/{spacecraftId}/tle",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.valar.space/operations/spacecraft/{spacecraftId}/tle"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.valar.space/operations/spacecraft/{spacecraftId}/tle")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valar.space/operations/spacecraft/{spacecraftId}/tle")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"timestamp": "2026-09-22T12:00:00Z",
"status": 400,
"error": "VALIDATION_ERROR",
"message": "Required parameter 'epoch' of type 'Instant' is missing",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}{
"timestamp": "2026-09-22T12:00:00Z",
"status": 401,
"error": "Unauthorized",
"message": "Invalid API key",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}{
"timestamp": "2026-09-22T12:00:00Z",
"status": 403,
"error": "ACCESS_ERROR",
"message": "Access denied",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}{
"timestamp": "2026-09-22T12:00:00Z",
"status": 404,
"error": "SC-4040",
"message": "Spacecraft with identifier '550e8400-e29b-41d4-a716-446655440000' not found",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}{
"timestamp": "2026-09-22T12:00:00Z",
"status": 406,
"error": "Not Acceptable",
"message": "Accept header is malformed or does not allow a supported response media type",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}{
"timestamp": "2026-09-22T12:00:00Z",
"status": 422,
"error": "COMPUTE_STATE_INSIDE_ELLIPSOID",
"message": "The requested computation resolved a state vector inside the Earth ellipsoid (sub-surface). Verify the spacecraft's state vector, or shorten the propagation window.",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}{
"timestamp": "2026-09-22T12:00:00Z",
"status": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"path": "/operations/spacecraft/550e8400-e29b-41d4-a716-446655440000/tle"
}Authorizations
API Key (format: vsp_sk_...)
Path Parameters
Canonical spacecraft ID from the spacecraft API; names, NORAD and COSPAR identifiers are not accepted
Query Parameters
Required target epoch as an ISO-8601 instant with timezone; no implicit default
Response
Two TLE lines separated by a newline, without a name line
The response is of type string.
Was this page helpful?