> ## Documentation Index
> Fetch the complete documentation index at: https://docs.verlon.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Meta

> Every Meta Model API model Verlon supports — the Muse Spark reasoning family — with quickstart, reasoning behaviour, and SDK compatibility.

Meta's Model API — the Muse Spark family, built for long, tool-heavy tasks that plan and orchestrate across services — is routable through Verlon in whichever SDK you already use. No Meta-specific SDK required.

## Chat models

| Model ID                     | Type | Context |
| ---------------------------- | ---- | ------- |
| `muse-spark-1.1`             | chat | 1049K   |
| `muse-spark-1.2`             | chat | 1049K   |
| `muse-spark-1.2-contributor` | chat | 1049K   |

<Note>
  This table is auto-generated from the Verlon model registry on every sync — see the [live registry](/provider-compatibility/models#live-registry) for pricing, benchmarks, and deprecation dates.
</Note>

## Quickstart

```typescript theme={null}
import { Verlon } from '@verlon-ai/sdk';

const verlon = new Verlon({ apiKey: process.env.VERLON_API_KEY });

const response = await verlon.chat({
  gateId: process.env.GATE_ID,
  model: 'muse-spark-1.2', // optional — overrides the gate's configured model
  data: {
    messages: [{ role: 'user', content: 'Hello!' }],
  },
});

console.log(response.content);
```

Any chat model from the table above works — swap `muse-spark-1.2` for any other ID.

## Reasoning

Muse Spark reasons on every request and **reasoning cannot be turned off**. `reasoningEffort` controls how much of it happens, but even the lowest setting still thinks:

```typescript theme={null}
const response = await verlon.chat({
  gateId: process.env.GATE_ID,
  data: {
    messages: [{ role: 'user', content: 'Prove there are infinitely many primes.' }],
    reasoningEffort: 'low', // 'low' | 'medium' | 'high' — Meta defaults to 'high'
  },
});
```

This matters more here than on most providers. A trivial prompt like "say hi" spends hundreds of reasoning tokens before it produces a single visible word, and those tokens are billed as output and count against your output cap. Verlon automatically reserves extra headroom on top of your `maxTokens` for reasoning models, so a small `maxTokens` won't be consumed entirely by thinking and leave you with an empty response.

`reasoningEffort` is portable: the same value maps to `reasoning_effort` on OpenAI and Meta, a thinking-token budget on Anthropic and Google, and is ignored by Mistral. Switching models doesn't require changing your code.

## SDK compatibility

The [Verlon SDK](/sdk-reference/overview) is the native path to every model on this page — the [quickstart above](#quickstart) is all it takes.

Already using Meta's own API? Meta serves OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages, and Verlon mirrors all three — so the swap is a base URL and nothing else:

```typescript theme={null}
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env.VERLON_API_KEY,
  baseURL: 'https://api.verlon.ai/v1', // was https://api.meta.ai/v1
});

const response = await client.chat.completions.create({
  model: 'muse-spark-1.2',
  messages: [{ role: 'user', content: 'Hello!' }],
});
```

The same applies to the [Anthropic SDK](/provider-compatibility/anthropic) against `/v1/messages`. Any SDK with a Verlon drop-in endpoint can reach these models: point it at Verlon, reference a gate that routes here, and your code stays unchanged.

### Streaming

```typescript theme={null}
for await (const chunk of verlon.chatStream({
  gateId: process.env.GATE_ID,
  data: { messages: [{ role: 'user', content: 'Tell me a joke.' }] },
})) {
  process.stdout.write(chunk.content ?? '');
}
```

## What's supported

<AccordionGroup>
  <Accordion title="Streaming">
    Full support for `stream: true` in every supported SDK — identical semantics to the source SDK.
  </Accordion>

  <Accordion title="Tool / function calling">
    Fully supported, including parallel tool calls. Verlon translates the tool-call shape between OpenAI / Anthropic / Meta native formats.
  </Accordion>

  <Accordion title="Structured output">
    `responseFormat` with `json_object` or a `json_schema` works the same as on OpenAI.
  </Accordion>

  <Accordion title="Reasoning effort">
    `reasoningEffort` maps to Meta's `reasoning_effort`. See [Reasoning](#reasoning) above.
  </Accordion>

  <Accordion title="Standard parameters">
    `temperature`, `maxTokens`, and `topP` are passed through.
  </Accordion>

  <Accordion title="Prompt caching">
    Cached input tokens are billed at a large discount and reported in every response's usage. No configuration needed.
  </Accordion>

  <Accordion title="Usage + cost tracking">
    Every response includes token usage — visible output and reasoning tokens separately — plus Verlon's `cost` field with the per-call dollar amount.
  </Accordion>
</AccordionGroup>

### Not available

* **Image, video, audio, embeddings, OCR.** The Model API is text-only; Muse Spark is a text and reasoning family. Route those modalities to OpenAI, Google, Anthropic, or Mistral and keep your chat traffic on Meta — that mix is exactly what gates are for.

## How it works

1. **You send** a request in your chosen SDK's format
2. **Verlon receives** — validates the gate, applies routing rules
3. **Verlon translates** to Meta's format and dispatches to the Model API
4. **Meta responds** with its raw response
5. **Verlon normalizes** back to your SDK's expected shape
6. **You receive** a response in the format your code already handles, with an added `cost` field

Your existing code doesn't know it's talking to Meta.

## Errors

| Status | Meaning             | What to check                                                                                        |
| ------ | ------------------- | ---------------------------------------------------------------------------------------------------- |
| `400`  | Invalid request     | Malformed body or missing `gateId`                                                                   |
| `401`  | Invalid API key     | Your `VERLON_API_KEY` value and the `Authorization: Bearer` header                                   |
| `404`  | Gate not found      | Your `GATE_ID` — the error message names the offending ID                                            |
| `429`  | Rate limit exceeded | Back off and retry; the body includes `reset_at`, and every response carries `X-RateLimit-*` headers |

The error shape always matches the SDK you're calling with. Through the Verlon SDK it surfaces as a thrown `Error`:

```typescript theme={null}
try {
  await verlon.chat({
    gateId: process.env.GATE_ID,
    data: { messages: [{ role: 'user', content: 'Hello!' }] },
  });
} catch (error) {
  // error.message carries the API's message,
  // e.g. 'Gate with ID "…" not found'
  console.error(error.message);
}
```

## Related

* [OpenAI](/provider-compatibility/openai) · [Anthropic](/provider-compatibility/anthropic) · [Google](/provider-compatibility/google) · [Mistral](/provider-compatibility/mistral) · [xAI](/provider-compatibility/xai)
* [Verlon SDK reference](/sdk-reference/overview) — one SDK across every provider and modality
* [Gates](/platform/gates) — set up routing rules and model configuration
