Public
Documentation Settings

Straico - API

The Straico API utilizes API keys for authentication. Please visit API Key page in My profile section to obtain the API key required for your requests.

Remember, it is essential to keep your API key confidential. Avoid sharing it with others or embedding it in any client-side code like browsers or apps. For secure handling, all production requests should be directed through your backend server, where the API key can be securely fetched from an environment variable or key management service.

Every API request must include your API key in an Authorization HTTP header in the following manner:

bash
Authorization: Bearer $STRAICO_API_KEY

User

GETUser information

https://api.straico.com/v0/user

Overview

This endpoint allows users to fetch details of a specific user from the Straico platform. Users can access information such as the user's first name, last name, the number of coins associated with the account, and the plan they are subscribed to.

Authentication

All requests must include an Authorization header with a valid API key.

Request Headers

  • Authorization: Bearer $STRAICO_API_KEY

Request Body

This endpoint does not require any parameters.

Response

The API responds with a JSON object containing the user's data under the "data" key.

FieldTypeDescription
first_namestringThe user's first name
last_namestringThe user's last name
coinsnumberThe number of coins associated with the account
planstringThe current subscription plan of the user

Model

GETModels information (v.0)

https://api.straico.com/v0/models

Overview

This endpoint provides users with a comprehensive list of available language models and their associated details within the Straico API ecosystem. By querying this endpoint, users can access up-to-date information about various models and their associated pricing

Authentication

All requests must include an Authorization header with a valid API key.

Request Headers

  • Authorization: Bearer $STRAICO_API_KEY

Request Body

This endpoint does not require any parameters.

Response

The API responds with a JSON object containing an array of model objects. Each model object includes the following information:

FieldTypeDescription
namestringModel display name
modelstringUnique model identifier for API usage
pricingobjectPricing information, detailing the cost in coins per specified number of words
max_outputnumberLimit number of tokens (roughly words or word pieces) that can be generated in a single response
Loading